@@ -5,6 +5,12 @@ import { readUnwrappedModel } from "ember-views/streams/utils";
5
5
import { isSimpleClick } from "ember-views/system/utils" ;
6
6
import ActionManager from "ember-views/system/action_manager" ;
7
7
8
+ function assert ( message , test ) {
9
+ // This only exists to prevent defeatureify from error when attempting
10
+ // to transform the same source twice (tldr; you can't nest stripped statements)
11
+ Ember . assert ( message , test ) ;
12
+ }
13
+
8
14
export default {
9
15
setupState : function ( state , env , scope , params , hash ) {
10
16
var getStream = env . hooks . get ;
@@ -13,15 +19,15 @@ export default {
13
19
var actionName = read ( params [ 0 ] ) ;
14
20
15
21
if ( Ember . FEATURES . isEnabled ( "ember-routing-htmlbars-improved-actions" ) ) {
16
- Ember . assert ( "You specified a quoteless path to the {{action}} helper " +
17
- "which did not resolve to an action name (a string). " +
18
- "Perhaps you meant to use a quoted actionName? (e.g. {{action 'save'}})." ,
19
- typeof actionName === 'string' || typeof actionName === 'function' ) ;
22
+ assert ( "You specified a quoteless path to the {{action}} helper " +
23
+ "which did not resolve to an action name (a string). " +
24
+ "Perhaps you meant to use a quoted actionName? (e.g. {{action 'save'}})." ,
25
+ typeof actionName === 'string' || typeof actionName === 'function' ) ;
20
26
} else {
21
- Ember . assert ( "You specified a quoteless path to the {{action}} helper " +
22
- "which did not resolve to an action name (a string). " +
23
- "Perhaps you meant to use a quoted actionName? (e.g. {{action 'save'}})." ,
24
- typeof actionName === 'string' ) ;
27
+ assert ( "You specified a quoteless path to the {{action}} helper " +
28
+ "which did not resolve to an action name (a string). " +
29
+ "Perhaps you meant to use a quoted actionName? (e.g. {{action 'save'}})." ,
30
+ typeof actionName === 'string' ) ;
25
31
}
26
32
27
33
var actionArgs = [ ] ;
0 commit comments