@esportsplus/template 0.23.3 → 0.23.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/attributes.js +1 -2
- package/package.json +1 -1
- package/src/attributes.ts +2 -3
package/build/attributes.js
CHANGED
|
@@ -152,9 +152,8 @@ const set = (element, name, value) => {
|
|
|
152
152
|
return;
|
|
153
153
|
}
|
|
154
154
|
if (type !== 'object') {
|
|
155
|
-
return fn(null, element, null, name, state, value);
|
|
156
155
|
}
|
|
157
|
-
if (isArray(value)) {
|
|
156
|
+
else if (isArray(value)) {
|
|
158
157
|
for (let i = 0, n = value.length; i < n; i++) {
|
|
159
158
|
let v = value[i];
|
|
160
159
|
if (v == null || v === false || v === '') {
|
package/package.json
CHANGED
package/src/attributes.ts
CHANGED
|
@@ -244,10 +244,9 @@ const set = (element: Element, name: string, value: unknown) => {
|
|
|
244
244
|
}
|
|
245
245
|
|
|
246
246
|
if (type !== 'object') {
|
|
247
|
-
|
|
247
|
+
// Skip isArray when possible
|
|
248
248
|
}
|
|
249
|
-
|
|
250
|
-
if (isArray(value)) {
|
|
249
|
+
else if (isArray(value)) {
|
|
251
250
|
for (let i = 0, n = value.length; i < n; i++) {
|
|
252
251
|
let v = value[i];
|
|
253
252
|
|