@writergate/quill-image-uploader-nextjs 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@writergate/quill-image-uploader-nextjs",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/enlear/quill-image-uploader-nextjs.git"
@@ -7,8 +7,14 @@ const ATTRIBUTES = ["class", "data-comment"];
7
7
  class CommentBlot extends InlineBlot {
8
8
  static create(value) {
9
9
  const node = super.create();
10
- node.setAttribute("class", value.class || "ql-wg-comment-wrapper");
11
- node.setAttribute("data-comment", value["data-comment"] || value.commentId);
10
+ const commentId = value["data-comment"] || value.commentId;
11
+ if (commentId) {
12
+ node.setAttribute("class", value.class || "ql-wg-comment-wrapper");
13
+ node.setAttribute(
14
+ "data-comment",
15
+ value["data-comment"] || value.commentId
16
+ );
17
+ }
12
18
  return node;
13
19
  }
14
20