File tree Expand file tree Collapse file tree 2 files changed +27
-1
lines changed
ember-htmlbars/tests/integration Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -82,3 +82,29 @@ QUnit.test('should be able to modify a provided attr into local state #11571 / #
82
82
equal ( view . $ ( ) . text ( ) , 'FIRST ATTR' , 'template lookup uses local state' ) ;
83
83
equal ( component . get ( 'first' ) , 'FIRST ATTR' , 'component lookup uses local state' ) ;
84
84
} ) ;
85
+
86
+ QUnit . test ( 'should be able to access unspecified attr #12035' , function ( ) {
87
+ var component ;
88
+
89
+ registry . register ( 'component:foo-bar' , Component . extend ( {
90
+ init ( ) {
91
+ this . _super ( ...arguments ) ;
92
+ component = this ;
93
+ } ,
94
+
95
+ didReceiveAttrs ( ) {
96
+ equal ( this . get ( 'woot' ) , 'yes' , 'found attr in didReceiveAttrs' ) ;
97
+ }
98
+ } ) ) ;
99
+ // registry.register('template:components/foo-bar', compile('{{first}}'));
100
+
101
+ view = EmberView . extend ( {
102
+ template : compile ( '{{foo-bar woot="yes"}}' ) ,
103
+ container : container
104
+ } ) . create ( ) ;
105
+
106
+ runAppend ( view ) ;
107
+
108
+ // equal(view.$().text(), 'FIRST ATTR', 'template lookup uses local state');
109
+ equal ( component . get ( 'woot' ) , 'yes' , 'component found attr' ) ;
110
+ } ) ;
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ let AttrsProxyMixin = {
69
69
// do not deprecate accessing `this[key]` at this time.
70
70
// add this back when we have a proper migration path
71
71
// Ember.deprecate(deprecation(key), { id: 'ember-views.', until: '3.0.0' });
72
- let possibleCell = attrs . key ;
72
+ let possibleCell = attrs [ key ] ;
73
73
74
74
if ( possibleCell && possibleCell [ MUTABLE_CELL ] ) {
75
75
return possibleCell . value ;
You can’t perform that action at this time.
0 commit comments