@atlaskit/editor-plugin-media 1.15.0 → 1.15.1

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/editor-plugin-media
2
2
 
3
+ ## 1.15.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#91420](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/91420) [`6d0d6452a5a0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/6d0d6452a5a0) - [ED-23025] Check for undefined annotations to avoid exceptions in embedded editor
8
+
3
9
  ## 1.15.0
4
10
 
5
11
  ### Minor Changes
@@ -47,7 +47,7 @@ var CommentBadgeWrapper = function CommentBadgeWrapper(_ref) {
47
47
  }
48
48
  }, [api.annotation, dispatch, mediaNode, state]);
49
49
  var pos = getPos();
50
- if (!Number.isFinite(pos) || !annotationState || !mediaNode || mediaNode.type !== media || mediaNode.marks.every(function (maybeAnnotation) {
50
+ if (!Number.isFinite(pos) || !(annotationState !== null && annotationState !== void 0 && annotationState.annotations) || !mediaNode || mediaNode.type !== media || mediaNode.marks.every(function (maybeAnnotation) {
51
51
  return maybeAnnotation.type !== annotation || !(maybeAnnotation.attrs.id in annotationState.annotations) || annotationState.annotations[maybeAnnotation.attrs.id];
52
52
  })) {
53
53
  return null;
@@ -42,7 +42,7 @@ const CommentBadgeWrapper = ({
42
42
  }
43
43
  }, [api.annotation, dispatch, mediaNode, state]);
44
44
  const pos = getPos();
45
- if (!Number.isFinite(pos) || !annotationState || !mediaNode || mediaNode.type !== media || mediaNode.marks.every(maybeAnnotation => maybeAnnotation.type !== annotation || !(maybeAnnotation.attrs.id in annotationState.annotations) || annotationState.annotations[maybeAnnotation.attrs.id])) {
45
+ if (!Number.isFinite(pos) || !(annotationState !== null && annotationState !== void 0 && annotationState.annotations) || !mediaNode || mediaNode.type !== media || mediaNode.marks.every(maybeAnnotation => maybeAnnotation.type !== annotation || !(maybeAnnotation.attrs.id in annotationState.annotations) || annotationState.annotations[maybeAnnotation.attrs.id])) {
46
46
  return null;
47
47
  }
48
48
  const mediaElement = view.domAtPos(pos + 1).node;
@@ -37,7 +37,7 @@ var CommentBadgeWrapper = function CommentBadgeWrapper(_ref) {
37
37
  }
38
38
  }, [api.annotation, dispatch, mediaNode, state]);
39
39
  var pos = getPos();
40
- if (!Number.isFinite(pos) || !annotationState || !mediaNode || mediaNode.type !== media || mediaNode.marks.every(function (maybeAnnotation) {
40
+ if (!Number.isFinite(pos) || !(annotationState !== null && annotationState !== void 0 && annotationState.annotations) || !mediaNode || mediaNode.type !== media || mediaNode.marks.every(function (maybeAnnotation) {
41
41
  return maybeAnnotation.type !== annotation || !(maybeAnnotation.attrs.id in annotationState.annotations) || annotationState.annotations[maybeAnnotation.attrs.id];
42
42
  })) {
43
43
  return null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-media",
3
- "version": "1.15.0",
3
+ "version": "1.15.1",
4
4
  "description": "Media plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",