neo.mjs 4.3.7 → 4.3.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neo.mjs",
3
- "version": "4.3.7",
3
+ "version": "4.3.8",
4
4
  "description": "The webworkers driven UI framework",
5
5
  "type": "module",
6
6
  "repository": {
package/src/core/Util.mjs CHANGED
@@ -142,6 +142,10 @@ class Util extends Base {
142
142
  * @returns {Boolean}
143
143
  */
144
144
  static isEmpty(value) {
145
+ if (value === null || value === undefined) {
146
+ return true;
147
+ }
148
+
145
149
  if (Array.isArray(value)) {
146
150
  return value.length === 0;
147
151
  }
@@ -563,8 +563,8 @@ class Text extends Base {
563
563
 
564
564
  me.getInputEl().value = value;
565
565
 
566
- if (!!value !== !!oldValue) { // change from empty to non-empty
567
- NeoArray[value && value.toString().length > 0 ? 'add' : 'remove'](cls, 'neo-has-content');
566
+ if (Neo.isEmpty(value) !== Neo.isEmpty(oldValue)) {
567
+ NeoArray[value !== null && value.toString().length > 0 ? 'add' : 'remove'](cls, 'neo-has-content');
568
568
  }
569
569
 
570
570
  NeoArray[me.originalConfig.value !== value ? 'add' : 'remove'](cls, 'neo-is-dirty');