From d94741a7819f9252d85271fa77b8c20d027d1470 Mon Sep 17 00:00:00 2001 From: gorhill Date: Fri, 5 Jun 2015 13:37:46 -0400 Subject: [PATCH] this fixes #300 --- src/js/tab.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/js/tab.js b/src/js/tab.js index 6560d447c..aa76e49e3 100644 --- a/src/js/tab.js +++ b/src/js/tab.js @@ -201,6 +201,13 @@ housekeep itself. break; } } + // https://github.com/gorhill/uBlock/issues/300 + // If no committed entry was found, fall back on the bottom-most one + // as being the committed one by default. + if ( i === -1 && this.stack.length !== 0 ) { + this.stack[0].committed = true; + i = 0; + } i += 1; if ( i < this.stack.length ) { this.stack.length = i;