mirror of https://github.com/gorhill/uBlock.git
Fix bad returned value in case of empty URL
Though I do no expect the empty URL case to ever occur, having the tokenizer return the wrong value if it ever occur could cause uBO to malfunction.
This commit is contained in:
parent
e417c9237e
commit
f2340bef3c
|
@ -146,7 +146,7 @@
|
||||||
const tokens = this._tokens;
|
const tokens = this._tokens;
|
||||||
let url = this._urlOut;
|
let url = this._urlOut;
|
||||||
let l = url.length;
|
let l = url.length;
|
||||||
if ( l === 0 ) { return this.emptyTokenHash; }
|
if ( l === 0 ) { return 0; }
|
||||||
if ( l > 2048 ) {
|
if ( l > 2048 ) {
|
||||||
url = url.slice(0, 2048);
|
url = url.slice(0, 2048);
|
||||||
l = 2048;
|
l = 2048;
|
||||||
|
|
Loading…
Reference in New Issue