Skip to content

Commit

Permalink
fix(ui): configurations: broken package.json mode, closes #1598
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Chau committed Jun 16, 2018
1 parent 9efdfaf commit 5885dd5
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function readFile (config, fileDescriptor, context) {
if (file) {
if (file.type === 'package') {
const pkg = folders.readPackage(cwd.get(), context)
fileData = pkg[config.files.package]
fileData = pkg[fileDescriptor.package]
} else if (file.type === 'js') {
fileData = loadModule(file.path, cwd.get(), true)
} else {
Expand Down Expand Up @@ -116,7 +116,7 @@ function writeFile (config, fileId, data, changedFields, context) {
let rawContent
if (file.type === 'package') {
const pkg = folders.readPackage(cwd.get(), context)
pkg[config.files.package] = data
pkg[fileDescriptor.package] = data
rawContent = JSON.stringify(pkg, null, 2)
} else {
if (file.type === 'json') {
Expand Down

0 comments on commit 5885dd5

Please sign in to comment.