fix importer es6 syntax incompat. with electron

This commit is contained in:
Lukas F. Hartmann 2018-04-12 17:46:40 +02:00
parent 76f85aa538
commit 86bd276d21

View File

@ -71,8 +71,8 @@ module.exports = {
// move nested attrs // move nested attrs
console.log(space) console.log(space)
for (let [k,v] of Object.entries(space.advanced)) { for (k in space.advanced) {
space[k] = v space[k] = space.advanced[k]
} }
db.Space.create(space) db.Space.create(space)
@ -89,14 +89,14 @@ module.exports = {
delete a.payload_thumbnail_big_uri delete a.payload_thumbnail_big_uri
// move nested attrs // move nested attrs
for (let [k,v] of Object.entries(a.meta)) { for (k in a.style) {
a[k] = v a[k] = a.style[k]
} }
for (let [k,v] of Object.entries(a.board)) { for (k in a.meta) {
a[k] = v a[k] = a.meta[k]
} }
for (let [k,v] of Object.entries(a.style)) { for (k in a.board) {
a[k] = v a[k] = a.board[k]
} }
let prefix = "/storage/"+relativeImportDir+"/"+space._id+"_files/" let prefix = "/storage/"+relativeImportDir+"/"+space._id+"_files/"