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

View file

@ -146,7 +146,7 @@
const tokens = this._tokens;
let url = this._urlOut;
let l = url.length;
if ( l === 0 ) { return this.emptyTokenHash; }
if ( l === 0 ) { return 0; }
if ( l > 2048 ) {
url = url.slice(0, 2048);
l = 2048;