In a discussion about troubleshooting an Ember helper, user stevenpslade reported an error where the helper named ‘color-shade’ could not be found. User eviltrout suggested that the file extension was incorrect, recommending the use of .js.es6 to ensure the file is autoloaded. After making this change, stevenpslade resolved the missing helper error but encountered a new TypeError regarding Ember.Helper.helper. eviltrout explained that the code was using a newer Ember API incompatible with Discourse’s older version and advised referencing existing Discourse helper definitions instead. Following this guidance, stevenpslade successfully implemented the helper using the registerUnbound method, resolving the issue.
I am trying to add an Ember helper but having no luck. I get this error:
Uncaught Error: Assertion Failed: A helper named 'color-shade' could not be found
Below is my helper, color-shade.js …
import Ember from 'ember';
export function colorShade(params) {
//just placeholder code for now
return params[0] === params[1];
}
export default Ember.Helper.helper(colorShade);