Skip to content

Commit

Permalink
Add assertion to verify preprocessor was run on create-ref modifier
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonbekolay committed Dec 13, 2023
1 parent e51cd21 commit 80ba31a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions addon/modifiers/create-ref.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ export default class RefModifier extends Modifier {
this._ctx = ctx;
this._element = element;

assert(
`Preprocessor was not executed on create-ref modifier. Check that ember-ref-bucket is included in the dependencies (not devDependencies) in package.json.`,
typeof named.debugName === 'string'
);
assert(
`You must provide string as first positional argument for {{${named.debugName}}}`,
typeof name === 'string' && name.length > 0
Expand Down

0 comments on commit 80ba31a

Please sign in to comment.