Threaded View
-
2 Jun 2011 1:06 PM #1
Directly loading invalid LocalStorage record throws an exception
Directly loading invalid LocalStorage record throws an exception
Directly loading an invalid LocalStorage record throws an exception instead of calling provided failure callback.
I am attempting to check if a record is in local storage on startup using something like the following test case. Instead of calling the failure callback an error is being thrown.
WebStorage.js:201
Uncaught TypeError: Cannot read property 'id' of null
Code:Ext.define('User', { extend: 'Ext.data.Model', fields: ['id', 'name'], proxy: { type: 'localstorage', id: 'user' } }); Ext.onReady(function() { var User = Ext.ModelManager.getModel('User'); User.load(1, { success: function(user) { console.dir(user); }, failure: function() { console.log('Failure'); } }); });
Thank you for reporting this bug. We will make it our priority to review this report.


Reply With Quote