thefrontside / ember-let

Create variable bindings inside your handlebars templates
MIT License
52 stars 16 forks source link

args.evaluate is not a function in ember 2.10.0 addon #34

Closed foxnewsnetwork closed 7 years ago

foxnewsnetwork commented 7 years ago

Version of ember-let: 0.5.3

Ember Version / Ember CLI Version:

Ember Version: 2.10.0 Ember CLI Version: 2.9.1

Steps To Reproduce:

  1. run ember addon my-ember-let
  2. open tests/dummy/app/templates/application.hbs
  3. Write the following:
    {{#let 'life is hard' as |truth|}}
    Why doesn't ember-let work straight out the box? Because {{truth}}
    {{/let}}
  4. Run ember s and navigate to localhost:4200

    Expected Behavior

    I expect to see the string rendered

Actual Behavior

Instead, I get the following error:

 Uncaught TypeError: args.evaluate is not a function(…)evaluateArgs @ ember.debug.js:53481
evaluate @ ember.debug.js:48764
execute @ ember.debug.js:53448
render @ ember.debug.js:53022
RootState.render @ ember.debug.js:11345
runInTransaction @ ember.debug.js:22304
_renderRoots @ ember.debug.js:11610
_renderRootsTransaction @ ember.debug.js:11648
_renderRoot @ ember.debug.js:11569
_appendDefinition @ ember.debug.js:11482
appendOutletView @ ember.debug.js:11465
invoke @ ember.debug.js:337
flush @ ember.debug.js:407
flush @ ember.debug.js:531
end @ ember.debug.js:601
run @ ember.debug.js:724
join @ ember.debug.js:746
run.join @ ember.debug.js:21562
(anonymous function) @ ember.debug.js:21625
fire @ jquery.js:3187
fireWith @ jquery.js:3317
ready @ jquery.js:3536
completed @ jquery.js:3552

Ember Twiddle / Example repo / Failing test:

https://github.com/foxnewsnetwork/ember-let-args-evaluate

References

Presumably, whatever @rwjblue did in https://github.com/thefrontside/ember-let/commit/96c4a08bc387154f61a24c129fe98667f28af47e to fix let not being registered in addons in 2.10.x isn't enough, something about core glimmer functionality is different.

Probably a continuation of https://github.com/thefrontside/ember-let/issues/26

Current Workaround

Opiton 1: Downgrading to ember 2.9.1 from 2.10.0 makes this thing work again.

foxnewsnetwork commented 7 years ago

Running the debugger, at the point where it breaks, we get:

screen shot 2016-12-07 at 2 24 58 pm

Notably, we see that we're getting an object that contains the args glimmer is expecting, which means somewhere along the line, we're passing in the wrong stuff

rwjblue commented 7 years ago

duplicate

was fixed by https://github.com/thefrontside/ember-let/pull/33, but not released

foxnewsnetwork commented 7 years ago

Oh, good 2 know, thank you. Should I close?

Robdel12 commented 7 years ago

Looks like this was taken care of with the v0.5.4 release.