@domql/element 2.5.101 → 2.5.102

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.
@@ -31,7 +31,7 @@ var attr_default = (params, element, node) => {
31
31
  if (params) {
32
32
  for (const attr in params) {
33
33
  const val = (0, import_utils.exec)(params[attr], element);
34
- if (val && node.setAttribute)
34
+ if ((0, import_utils.isDefined)(val) && node.setAttribute)
35
35
  node.setAttribute(attr, val);
36
36
  else if (node.removeAttribute)
37
37
  node.removeAttribute(attr);
package/mixins/attr.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict'
2
2
 
3
- import { exec, isNot } from '@domql/utils'
3
+ import { exec, isNot, isDefined } from '@domql/utils'
4
4
  import { report } from '@domql/report'
5
5
 
6
6
  /**
@@ -14,7 +14,7 @@ export default (params, element, node) => {
14
14
  for (const attr in params) {
15
15
  const val = exec(params[attr], element)
16
16
  // if (__attr[attr] === val) return
17
- if (val && node.setAttribute) node.setAttribute(attr, val)
17
+ if (isDefined(val) && node.setAttribute) node.setAttribute(attr, val)
18
18
  else if (node.removeAttribute) node.removeAttribute(attr)
19
19
  __attr[attr] = val
20
20
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@domql/element",
3
- "version": "2.5.101",
3
+ "version": "2.5.102",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "index.js",
@@ -31,7 +31,7 @@
31
31
  "@domql/state": "latest",
32
32
  "@domql/utils": "latest"
33
33
  },
34
- "gitHead": "5a5e8988f25e9a77e44596d9fd23e8a00b725685",
34
+ "gitHead": "9f0516bbf6310b86c6d78f6bb0bfd3bf3347469b",
35
35
  "devDependencies": {
36
36
  "@babel/core": "^7.12.0"
37
37
  }