@cocreate/attributes
Advanced tools
Comparing version 1.2.10 to 1.2.11
@@ -0,1 +1,8 @@ | ||
## [1.2.11](https://github.com/CoCreate-app/CoCreate-attributes/compare/v1.2.10...v1.2.11) (2021-09-16) | ||
### Bug Fixes | ||
* could not read value of an array of objects. and threw error if error legnth 0 ([93bbd28](https://github.com/CoCreate-app/CoCreate-attributes/commit/93bbd283daa7c168fd60031a0c30494c8833b349)) | ||
## [1.2.10](https://github.com/CoCreate-app/CoCreate-attributes/compare/v1.2.9...v1.2.10) (2021-09-14) | ||
@@ -2,0 +9,0 @@ |
@@ -23,3 +23,3 @@ module.exports = { | ||
"public": "true", | ||
"website_id": "61381ed8829b690010a4f2b2" | ||
"website_id": "614298c2829b690010a5c031" | ||
} | ||
@@ -26,0 +26,0 @@ } |
{ | ||
"name": "@cocreate/attributes", | ||
"version": "1.2.10", | ||
"version": "1.2.11", | ||
"description": "Simple HTML5 & JavaScript component add, update & remove values in element's attributes from input, select or js api. Easily configured using HTML5 data-attributes and/or JavaScript API.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -211,7 +211,14 @@ /*global CustomEvent*/ | ||
let value; | ||
let item; | ||
if(Array.isArray(inputValue)) { | ||
if (!inputValue.length) return; | ||
if(property === 'class') | ||
value = inputValue.map(o => o.value).join(' '); | ||
else | ||
value = inputValue[0].value; | ||
try { | ||
item = inputValue[0]; | ||
value = item.value; | ||
} catch (err) { | ||
console.error(err); | ||
} | ||
} | ||
@@ -218,0 +225,0 @@ else |
Sorry, the diff of this file is not supported yet
74150
760