e534a911f3
Prettier v2 has the following breaking changes: * enforces spaces between `function` and params * enforces trailing commas by default
10 lines
255 B
JavaScript
10 lines
255 B
JavaScript
export default function (instance) {
|
|
instance.registerHelper('lookup', function (obj, field, options) {
|
|
if (!obj) {
|
|
// Note for 5.0: Change to "obj == null" in 5.0
|
|
return obj;
|
|
}
|
|
return options.lookupProperty(obj, field);
|
|
});
|
|
}
|