addMarkedSpan error

Hi, I upgraded cm library from 5.58.1 to 5.65.2 in my nw.js application and now everything connected to setting text markers throws: “Uncaught TypeError: Invalid value used in weak set” in line 1327:

  function addMarkedSpan(line, span, op) {
    var inThisOp = op && window.WeakSet && (op.markedSpans || (op.markedSpans = new WeakSet));
    if (inThisOp && inThisOp.has(line.markedSpans)) {  // breaks here
      line.markedSpans.push(span);
    } else {
      line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];
      if (inThisOp) { inThisOp.add(line.markedSpans); }
    }
    span.marker.attachLine(line);
  }

Was this reported before?

Thanks for any insight.

i.

Thanks for the report. This patch should help with this.

Thanks, that solves all the problems for me.
Regards,
iztok