Ember.js-in-Action-Source icon indicating copy to clipboard operation
Ember.js-in-Action-Source copied to clipboard

Uncaught TypeError: Cannot read property 'lookup' of undefined

Open kgish opened this issue 10 years ago • 3 comments

I noticed that starting with app3.js/index3.html, I observe the following error in the console when I hit the update button:

Uncaught TypeError: Cannot read property 'lookup' of undefined
DS.JSONSerializer.Ember.Object.extend.transformFor ember-data-beta-1.js:231
(anonymous function)      ember-data-beta-1.js:156
(anonymous function) ember-data-beta-1.js:3742
(anonymous function) ember-1.0.0.js:3172
OrderedSet.forEach ember-1.0.0.js:3015
Map.forEach ember-1.0.0.js:3170
DS.Model.reopenClass.eachAttribute ember-data-beta-1.js:3741
DS.Model.reopen.eachAttribute ember-data-beta-1.js:3756
DS.JSONSerializer.Ember.Object.extend.serialize ember-data-beta-1.js:152
DS.Model.Ember.Object.extend.toJSON ember-data-beta-1.js:3254
DS.LSAdapter.DS.Adapter.extend.updateRecord ember-data-localstorage.js:89
...

kgish avatar Nov 15 '14 14:11 kgish

I was able to fix this by upgrading to newer versions:

DEBUG: -------------------------------
DEBUG: Ember      : 1.8.1
DEBUG: Ember Data : 1.0.0-beta.11
DEBUG: Handlebars : 1.0.0
DEBUG: jQuery     : 1.10.2
DEBUG: ------------------------------- 

And replacing (which has been deprecated)

Notes.Store = DS.Store.extend({
    adapter: DS.LSAdapter
});

with

Notes.ApplicationAdapter = DS.LSAdapter.extend({});

kgish avatar Nov 15 '14 20:11 kgish

Turns out that unfortunately with the updates the last chapter section on modal delete dialog does not work.

kgish avatar Nov 16 '14 13:11 kgish

I fixed some issues and updated to the last ember version. You can check on my repo [email protected]:mtunjic/ember-notes.git

mtunjic avatar Dec 12 '14 14:12 mtunjic