@atlaskit/adf-schema 50.2.3 → 50.2.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/adf-schema
2
2
 
3
+ ## 50.2.4
4
+
5
+ ### Patch Changes
6
+
7
+ - 79c4757: Added fix for table cell attribute parser which was not correctly identifying background colors when the data-cell-background attribute was not lowercase
8
+
3
9
  ## 50.2.3
4
10
 
5
11
  ### Patch Changes
@@ -172,7 +172,9 @@ var getCellDomAttrs = exports.getCellDomAttrs = function getCellDomAttrs(node) {
172
172
  if (color) {
173
173
  attrs['data-cell-background'] = color;
174
174
  }
175
- attrs.colorname = tableBackgroundColorPalette.get(color);
175
+ if (typeof color === 'string') {
176
+ attrs.colorname = tableBackgroundColorPalette.get(color.toLowerCase());
177
+ }
176
178
  }
177
179
  }
178
180
  if (nodeType === 'tableHeader') {
@@ -163,7 +163,9 @@ export const getCellDomAttrs = node => {
163
163
  if (color) {
164
164
  attrs['data-cell-background'] = color;
165
165
  }
166
- attrs.colorname = tableBackgroundColorPalette.get(color);
166
+ if (typeof color === 'string') {
167
+ attrs.colorname = tableBackgroundColorPalette.get(color.toLowerCase());
168
+ }
167
169
  }
168
170
  }
169
171
  if (nodeType === 'tableHeader') {
@@ -165,7 +165,9 @@ export var getCellDomAttrs = function getCellDomAttrs(node) {
165
165
  if (color) {
166
166
  attrs['data-cell-background'] = color;
167
167
  }
168
- attrs.colorname = tableBackgroundColorPalette.get(color);
168
+ if (typeof color === 'string') {
169
+ attrs.colorname = tableBackgroundColorPalette.get(color.toLowerCase());
170
+ }
169
171
  }
170
172
  }
171
173
  if (nodeType === 'tableHeader') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "50.2.3",
3
+ "version": "50.2.4",
4
4
  "description": "Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"