@itrocks/table 0.0.14 → 0.0.15

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.
Files changed (3) hide show
  1. package/edit/lock.js +1 -2
  2. package/edit.js +3 -3
  3. package/package.json +1 -1
package/edit/lock.js CHANGED
@@ -54,8 +54,7 @@ export class TableEditLock extends Plugin {
54
54
  editable = undefined;
55
55
  break;
56
56
  default:
57
- if (!style)
58
- style = getComputedStyle(editable);
57
+ style ??= getComputedStyle(editable);
59
58
  if (style[index] === value)
60
59
  editable = undefined;
61
60
  }
package/edit.js CHANGED
@@ -77,12 +77,12 @@ export class TableEdit extends Plugin {
77
77
  const contentEditable = editable.editable;
78
78
  const text = contentEditable.value();
79
79
  if (text.includes(contentEditable.br())) {
80
- if (editable.style.lineHeight) {
80
+ if ('lineHeight' in editable.style) {
81
81
  editable.style.removeProperty('line-height');
82
82
  }
83
83
  }
84
- else if (!editable.style.lineHeight) {
85
- editable.style.lineHeight = editable.style.minHeight;
84
+ else {
85
+ editable.style.lineHeight ??= editable.style.minHeight;
86
86
  }
87
87
  this.setSelectedText(text);
88
88
  });
package/package.json CHANGED
@@ -49,5 +49,5 @@
49
49
  },
50
50
  "type": "module",
51
51
  "types": "./table.d.ts",
52
- "version": "0.0.14"
52
+ "version": "0.0.15"
53
53
  }