From 7e5ebb04d2574477c85947683c5bb4e7bd79991e Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Wed, 28 Mar 2018 10:41:45 +0900 Subject: [PATCH] refactor: remove eas.length check --- lib/webidl2.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/webidl2.js b/lib/webidl2.js index c0fe7156..a2a5cd0c 100644 --- a/lib/webidl2.js +++ b/lib/webidl2.js @@ -466,11 +466,7 @@ eas[0] = simple_extended_attr(store) || error("Extended attribute with not content"); all_ws(); while (consume(OTHER, ",")) { - if (eas.length) { - eas.push(simple_extended_attr(store)); - } else { - eas.push(simple_extended_attr(store) || error("Trailing comma in extended attribute")); - } + eas.push(simple_extended_attr(store) || error("Trailing comma in extended attribute")); } all_ws(); consume(OTHER, "]") || error("No end of extended attribute");