Out of bounds checking for array access
This fixes a crasher in v4, without backtrace. Trying to reproduce it in a simpler case, but this at least makes PageStack work.
This commit is contained in:
parent
51de1b4a59
commit
79ad02c244
@ -70,7 +70,10 @@ function push(page, properties, replace, immediate) {
|
||||
}
|
||||
|
||||
// get the current container
|
||||
var oldContainer = pageStack[pageStack.length - 1];
|
||||
var oldContainer;
|
||||
if (pageStack.length) {
|
||||
oldContainer = pageStack[pageStack.length - 1];
|
||||
}
|
||||
|
||||
// pop the old container off the stack if this is a replace
|
||||
if (oldContainer && replace) {
|
||||
|
Loading…
Reference in New Issue
Block a user