From fa2f3fb4440fc8f0a33a0f48e484ff064876da9b Mon Sep 17 00:00:00 2001 From: Cassie Tarakajian Date: Wed, 2 May 2018 12:29:38 -0700 Subject: [PATCH] fix crash in example fetch script --- server/examples.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/server/examples.js b/server/examples.js index 5113fb4e..baf61524 100644 --- a/server/examples.js +++ b/server/examples.js @@ -135,8 +135,6 @@ function createProjectsInP5user(projectsInAllCategories) { }; rp(options).then((res) => { - const assets = JSON.parse(res); - User.findOne({ username: process.env.EXAMPLE_USERNAME }, (err, user) => { if (err) throw err; @@ -231,7 +229,7 @@ function createProjectsInP5user(projectsInAllCategories) { } const assetsInProject = project.sketchContent.match(/assets\/[\w-]+\.[\w]*/g) - || project.sketchContent.match(/assets\/[\w-]*/g) || []; + || project.sketchContent.match(/asset\/[\w-]*/g) || []; assetsInProject.forEach((assetNamePath, i) => { let assetName = assetNamePath.split('assets/')[1];