46:14d6c0a48023
Anton Shestakov <engored@ya.ru>, Sun, 05 Apr 2015 03:44:40 +0800
Catch and work around exceptions when localStorage is not available

previous change 43:d1ff547fa61d

static/js/framework/collections.js

Permissions: -rw-r--r--

Other formats: Feeds:
try {
var workspacesExtra = {
localStorage: new Backbone.LocalStorage('workspaces')
};
} catch (e) {
var workspacesExtra = {
fetch: function() {},
create: function() {}
};
}
var Workspaces = Backbone.Collection.extend(_({model: Workspace}).extend(workspacesExtra));
var Projects = Backbone.Collection.extend({
model: Project
});
var Tasks = Backbone.Collection.extend({
model: Task
});