Wraps .jsbeautifyrc file read into a try/catch since it could be no longer available.
This commit is contained in:
parent
1cb84db4f9
commit
f99e24cf6c
|
@ -633,9 +633,12 @@ module.exports = class Beautifiers extends EventEmitter
|
|||
externalOptions = undefined
|
||||
if configPath
|
||||
fs ?= require("fs")
|
||||
try
|
||||
contents = fs.readFileSync(configPath,
|
||||
encoding : "utf8"
|
||||
)
|
||||
catch error
|
||||
contents = null #file isnt available anymore
|
||||
unless contents
|
||||
externalOptions = {}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue