@atlaskit/editor-plugin-annotation 1.25.7 → 1.26.0

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,13 @@
1
1
  # @atlaskit/editor-plugin-annotation
2
2
 
3
+ ## 1.26.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#173684](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/173684)
8
+ [`e022c83d84bd3`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e022c83d84bd3) -
9
+ Fix errors caused by not checking for undefined annotation toolbar
10
+
3
11
  ## 1.25.7
4
12
 
5
13
  ### Patch Changes
@@ -98,9 +98,13 @@ var annotationPlugin = exports.annotationPlugin = function annotationPlugin(_ref
98
98
  isToolbarAbove: isToolbarAbove,
99
99
  api: api
100
100
  });
101
- return _objectSpread(_objectSpread({}, toolbarConfig), {}, {
102
- rank: (0, _experiments.editorExperiment)('contextual_formatting_toolbar', true) ? 1 : undefined
103
- });
101
+ if (!toolbarConfig) {
102
+ return undefined;
103
+ } else {
104
+ return _objectSpread(_objectSpread({}, toolbarConfig), {}, {
105
+ rank: (0, _experiments.editorExperiment)('contextual_formatting_toolbar', true) ? 1 : undefined
106
+ });
107
+ }
104
108
  }
105
109
  }
106
110
  },
@@ -84,10 +84,14 @@ export const annotationPlugin = ({
84
84
  isToolbarAbove,
85
85
  api
86
86
  });
87
- return {
88
- ...toolbarConfig,
89
- rank: editorExperiment('contextual_formatting_toolbar', true) ? 1 : undefined
90
- };
87
+ if (!toolbarConfig) {
88
+ return undefined;
89
+ } else {
90
+ return {
91
+ ...toolbarConfig,
92
+ rank: editorExperiment('contextual_formatting_toolbar', true) ? 1 : undefined
93
+ };
94
+ }
91
95
  }
92
96
  }
93
97
  },
@@ -85,9 +85,13 @@ export var annotationPlugin = function annotationPlugin(_ref) {
85
85
  isToolbarAbove: isToolbarAbove,
86
86
  api: api
87
87
  });
88
- return _objectSpread(_objectSpread({}, toolbarConfig), {}, {
89
- rank: editorExperiment('contextual_formatting_toolbar', true) ? 1 : undefined
90
- });
88
+ if (!toolbarConfig) {
89
+ return undefined;
90
+ } else {
91
+ return _objectSpread(_objectSpread({}, toolbarConfig), {}, {
92
+ rank: editorExperiment('contextual_formatting_toolbar', true) ? 1 : undefined
93
+ });
94
+ }
91
95
  }
92
96
  }
93
97
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-annotation",
3
- "version": "1.25.7",
3
+ "version": "1.26.0",
4
4
  "description": "Annotation plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",