Explorar o código

prevent mutating the original config template object

Benoît Hubert %!s(int64=8) %!d(string=hai) anos
pai
achega
560e5578b7
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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;