From 86bd276d21140b5b2477002c69c7defd92a5e623 Mon Sep 17 00:00:00 2001 From: "Lukas F. Hartmann" Date: Thu, 12 Apr 2018 17:46:40 +0200 Subject: [PATCH] fix importer es6 syntax incompat. with electron --- helpers/importer.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/helpers/importer.js b/helpers/importer.js index 40ebcd0..4d50946 100644 --- a/helpers/importer.js +++ b/helpers/importer.js @@ -71,8 +71,8 @@ module.exports = { // move nested attrs console.log(space) - for (let [k,v] of Object.entries(space.advanced)) { - space[k] = v + for (k in space.advanced) { + space[k] = space.advanced[k] } db.Space.create(space) @@ -89,14 +89,14 @@ module.exports = { delete a.payload_thumbnail_big_uri // move nested attrs - for (let [k,v] of Object.entries(a.meta)) { - a[k] = v + for (k in a.style) { + a[k] = a.style[k] } - for (let [k,v] of Object.entries(a.board)) { - a[k] = v + for (k in a.meta) { + a[k] = a.meta[k] } - for (let [k,v] of Object.entries(a.style)) { - a[k] = v + for (k in a.board) { + a[k] = a.board[k] } let prefix = "/storage/"+relativeImportDir+"/"+space._id+"_files/"