Prevent JS crashes in case of empty history

This commit is contained in:
Matthias Jentsch 2015-08-26 11:50:04 +02:00
parent d88336dc39
commit 53bc494c46

View File

@ -163,7 +163,7 @@
// notify behaviors of the state change // notify behaviors of the state change
$.each(this.icinga.behaviors, function (i, behavior) { $.each(this.icinga.behaviors, function (i, behavior) {
if (behavior.onPopState instanceof Function) { if (behavior.onPopState instanceof Function && history.state) {
behavior.onPopState(location.href, history.state[i]); behavior.onPopState(location.href, history.state[i]);
} }
}); });