aboutsummaryrefslogtreecommitdiff
path: root/app.js
diff options
context:
space:
mode:
authorache <ache@ache.one>2018-02-07 04:50:23 +0100
committerache <ache@ache.one>2018-02-07 04:50:23 +0100
commitf7f258b33a583d645e65aa37f386d217c2ebe4fd (patch)
treefbca797c6b29c5d3063b7d245e42ef42bd15df32 /app.js
parentMake the tests (diff)
Pass every test
Diffstat (limited to 'app.js')
-rw-r--r--app.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/app.js b/app.js
index 5b4ec1b..f0f10f2 100644
--- a/app.js
+++ b/app.js
@@ -31,7 +31,7 @@ function parseHTMLparam(value, indexNext) {
return eaten;
};
- const prop = {key: undefined /* {} */, class: undefined /* [] */, id: undefined};
+ const prop = {key: undefined /* {} */, class: undefined /* [] */, id: undefined, type: 'text'};
let type;
while (value.charAt(indexNext) !== '}') {
@@ -89,7 +89,7 @@ function parseHTMLparam(value, indexNext) {
}
switch (type) {
case 'id': // ID
- prop.id = labelFirst;
+ prop.id = prop.id || labelFirst;
break;
case 'class':
if (!prop.class) {