Fix for "obj.hasOwnProperty is not a function" #7148

Closed
opened 2025-11-13 20:57:34 +01:00 by marijnh · 6 comments
marijnh commented 2025-11-13 20:57:34 +01:00 (Migrated from gitlab.com)
  function copyObj(obj, target, overwrite) {
    if (!target) { target = {}; }
    for (var prop in obj) {
      if (Object.prototype.hasOwnProperty.call(obj, prop) && (overwrite !== false || !Object.prototype.hasOwnProperty.call(target, prop))) {
        target[prop] = obj[prop];
      }
    }
    return target
  }

https://www.drupal.org/project/ckeditor_codemirror/issues/3531472

```js function copyObj(obj, target, overwrite) { if (!target) { target = {}; } for (var prop in obj) { if (Object.prototype.hasOwnProperty.call(obj, prop) && (overwrite !== false || !Object.prototype.hasOwnProperty.call(target, prop))) { target[prop] = obj[prop]; } } return target } ``` https://www.drupal.org/project/ckeditor_codemirror/issues/3531472
marijnh commented 2026-01-26 16:48:56 +01:00 (Migrated from gitlab.com)

Thank you, this solved the problem on Drupal.

Thank you, this solved the problem on Drupal.
marijnh commented 2026-02-05 16:06:47 +01:00 (Migrated from gitlab.com)

API changes in CKEditor 5 v45.0 break the plugin. MR 7154 https://github.com/codemirror/codemirror5/pull/7154 fixes it

API changes in CKEditor 5 v45.0 break the plugin. MR 7154 https://github.com/codemirror/codemirror5/pull/7154 fixes it
marijnh commented 2026-02-05 21:19:31 +01:00 (Migrated from gitlab.com)
Fixed in https://github.com/codemirror/codemirror5/commit/cc753ef5d757f6879461949d03c2569a21854528
marijnh (Migrated from gitlab.com) closed this issue 2026-02-05 21:19:31 +01:00
marijnh commented 2026-02-06 15:30:40 +01:00 (Migrated from gitlab.com)

@mbomb007 please tag and release this fix. The importance of this fix is growing daily as more and more people start using the latest ckeditor5 releases.

`@mbomb007` please tag and release this fix. The importance of this fix is growing daily as more and more people start using the latest ckeditor5 releases.
marijnh commented 2026-02-06 16:00:45 +01:00 (Migrated from gitlab.com)

I'm not a maintainer.

I'm not a maintainer.
marijnh commented 2026-02-06 17:28:10 +01:00 (Migrated from gitlab.com)

@marijnh please tag and release this fix. The importance of this fix is growing daily as more and more people start using the latest ckeditor5 releases.

`@marijnh` please tag and release this fix. The importance of this fix is growing daily as more and more people start using the latest ckeditor5 releases.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
codemirror/codemirror5#7148
No description provided.