mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
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
1 changed files with 1 additions and 1 deletions
|
|
@ -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 a new issue