From b2ab3d45ad985023adf9b07af213fa424f8cbfd2 Mon Sep 17 00:00:00 2001 From: tophf Date: Wed, 17 May 2017 16:04:33 +0300 Subject: [PATCH] fixup bc63ecca: unget only if matched --- csslint/csslint-worker.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/csslint/csslint-worker.js b/csslint/csslint-worker.js index 31b24a10..75b5df44 100644 --- a/csslint/csslint-worker.js +++ b/csslint/csslint-worker.js @@ -2288,12 +2288,13 @@ Parser.prototype = function() { value += tokenStream.token().value; value += this._readWhitespace(); - if (tokenStream.match([Tokens.IDENT]) - && tokenStream.token().value.toLowerCase() == 'i') { - value += tokenStream.token().value; - value += this._readWhitespace(); - } else { - tokenStream.unget(); + if (tokenStream.match([Tokens.IDENT])) { + if (tokenStream.token().value.toLowerCase() == 'i') { + value += tokenStream.token().value; + value += this._readWhitespace(); + } else { + tokenStream.unget(); + } } }