summaryrefslogtreecommitdiff
path: root/itjs
diff options
context:
space:
mode:
authorThomas BrĂ¼derli2012-06-05 08:43:58 +0000
committerThomas BrĂ¼derli2012-06-05 08:43:58 +0000
commit694a54d2f75661546a098f3c939501748ab22c31 (patch)
tree685e793ef73f1996849003a5d3b6511a50bef8fd /itjs
parent864632224f92940637cac73864af3a8965e72d7c (diff)
downloaditools-694a54d2f75661546a098f3c939501748ab22c31.tar.gz
itools-694a54d2f75661546a098f3c939501748ab22c31.tar.bz2
itools-694a54d2f75661546a098f3c939501748ab22c31.zip
Check objects before executing callback methods
Diffstat (limited to 'itjs')
-rw-r--r--itjs/state.js5
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)