Procházet zdrojové kódy

prevent mutating the original config template object

Benoît Hubert před 8 roky
rodič
revize
560e5578b7
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      sandboxApp.js

+ 1 - 1
sandboxApp.js

@@ -267,7 +267,7 @@ app.post('/:repoSlug/examples',
       slug: exampleSlug,
       title,
       category: req.repo.defaultCategory
-    }, exampleTmpl);
+    }, _.cloneDeep(exampleTmpl));
 
     // Prepare files to write
     var targetDir = examplesDir + '/' + repoSlug + '/' + exampleSlug;