Explorar o código

use Number function

Gildas %!s(int64=7) %!d(string=hai) anos
pai
achega
365b3fecea
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      lib/single-file/css-declarations-parser.js

+ 2 - 2
lib/single-file/css-declarations-parser.js

@@ -509,7 +509,7 @@ this.parseCss = this.parseCss || (() => {
 
 		const convertAStringToANumber = function (string) {
 			// CSS's number rules are identical to JS, afaik.
-			return +string;
+			return Number(string);
 		};
 
 		const consumeTheRemnantsOfABadURL = function () {
@@ -536,7 +536,7 @@ this.parseCss = this.parseCss || (() => {
 		return tokens;
 	}
 
-	function CSSParserToken() { throw "Abstract Base Class"; }
+	function CSSParserToken() { }
 	CSSParserToken.prototype.toString = function () { return this.tokenType; };
 
 	function BadStringToken() { return this; }