Skip to content

Commit

Permalink
Prevent stored config being parsed twice. Fixes lwsjs/local-web-serve…
Browse files Browse the repository at this point in the history
  • Loading branch information
75lb committed Aug 1, 2024
1 parent 21c341e commit fd0e0d8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,9 @@ class Lws extends EventEmitter {
*/
static async create (config) {
const lws = new this(config)
await lws.loadStoredConfig()
if (!config._alreadyMerged) {
await lws.loadStoredConfig()
}

/* attach the view */
lws.useView()
Expand Down
1 change: 1 addition & 0 deletions lib/cli-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ class LwsCli {
options = deepMerge(options, storedConfig, cliOptions)
options.stack = stack
options.view = view
options._alreadyMerged = true
return options
}

Expand Down

0 comments on commit fd0e0d8

Please sign in to comment.