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:
Raymond Hill 2019-10-17 17:23:05 -04:00
parent e417c9237e
commit f2340bef3c
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 1 additions and 1 deletions

View File

@ -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;