sebavan 5 年之前
父節點
當前提交
25d54b07a7
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/Misc/deepCopier.ts

+ 2 - 1
src/Misc/deepCopier.ts

@@ -44,7 +44,8 @@ export class DeepCopier {
      * @param mustCopyList defines a list of properties to copy (even if they start with _)
      */
     public static DeepCopy(source: any, destination: any, doNotCopyList?: string[], mustCopyList?: string[]): void {
-        for (var prop in getAllPropertyNames(source)) {
+        const proerties = getAllPropertyNames(source);
+        for (var prop of proerties) {
 
             if (prop[0] === "_" && (!mustCopyList || mustCopyList.indexOf(prop) === -1)) {
                 continue;