Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Don't try to restore from undefined state

  • Loading branch information...
commit ef97e3162b84a008383467a629d9d7e57022fab8 1 parent 1644224
@robarnold robarnold authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 sessionrestore.js
View
6 sessionrestore.js
@@ -17,7 +17,11 @@ exports.restore = function (createbackend) {
var backend;
for (name in session.db.channels) {
createbackend(name, function (backend) {
- channels.add(name, backend).restoreState(session.db.channels[name].state);
+ var state = session.db.channels[name].state;
+ var channel = channels.add(name, backend);
+ if (state !== undefined) {
+ channel.restoreState(state);
+ }
});
}
};
Please sign in to comment.
Something went wrong with that request. Please try again.