10 lines
253 B
Plaintext
10 lines
253 B
Plaintext
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);
|
|
});
|
|
}
|