diff options
Diffstat (limited to 'itjs/state.js')
-rw-r--r-- | itjs/state.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/itjs/state.js b/itjs/state.js index e5e7c97..19f7438 100644 --- a/itjs/state.js +++ b/itjs/state.js @@ -82,7 +82,7 @@ restore_history: function() for (var i in this.it_restore_handlers) { - if (this.it_history_field.value || (this.it_restore_handlers[i].initial && (!idoc || !idoc.location.href.match(/s=/)))) + if ((this.it_history_field.value || (this.it_restore_handlers[i].initial && (!idoc || !idoc.location.href.match(/s=/)))) && this.it_restore_handlers[i].object) this.it_restore_handlers[i].object[this.it_restore_handlers[i].method](); } }, @@ -100,7 +100,8 @@ store_state: function() this.it_history_field = idoc ? idoc.getElementById('state') : {}; // Work-around IE5 not returning iframe document for (var i in this.it_store_handlers) - this.it_store_handlers[i].object[this.it_store_handlers[i].method](); + if (this.it_store_handlers[i].object) + this.it_store_handlers[i].object[this.it_store_handlers[i].method](); var ser = []; for (var key in this) |