To debug I’d either put a breakpoint in the helper code.
Assuming shop is an ember data model the problem is probably the fact that you aren’t using “get” in the helper to access the identifier and name properties, you’re just treating it like a POJO.
Maybe try this?
import { helper } from '@ember/component/helper';
import { get } from `@ember/object';
export function shopName(shop) {
return `${get(shop,'identifier')}-${get(shop,'name')}`;
}
export default helper(shopName);
Your helper function signature is a bit off. When you do {{ my-helper 'one' 'two' }}, your helper function will get an array. So
export function myHelper(params) {
// params[0] will be 'one'
// params[1] will be 'two'
}
You can easily destruct the array in your case
import { helper } from '@ember/component/helper';
export function shopName([shop]) { // <-- Like this
return `${shop.identifier}-${shop.name}`;
}
export default helper(shopName);
Just as a note, the general best-practice around adding computed properties to models is to avoid it, when the CP is just to display something in the template. This blog post on EmberMap has some good information about when to use CPs on models and when to avoid them.