Explorar o código

deep copy value in set

Mehmet Bektas %!s(int64=5) %!d(string=hai) anos
pai
achega
464e31c97d
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      packages/outputarea/src/model.ts

+ 1 - 0
packages/outputarea/src/model.ts

@@ -228,6 +228,7 @@ export class OutputAreaModel implements IOutputAreaModel {
    * Set the value at the specified index.
    */
   set(index: number, value: nbformat.IOutput): void {
+    value = JSONExt.deepCopy(value);
     // Normalize stream data.
     Private.normalize(value);
     let item = this._createItem({ value, trusted: this._trusted });