mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-12-17 06:08:06 +00:00
Introduce JSON parse utility function with error handling (#6401)
* Introduce JSON parse utility function with error handling Fixes #6400 * Fix typo
This commit is contained in:
@@ -48,7 +48,7 @@ Command.prototype.execute = function() {
|
||||
}
|
||||
// Tweak the tiddlywiki.info to remove any included wikis
|
||||
var packagePath = $tw.boot.wikiPath + "/tiddlywiki.info",
|
||||
packageJson = JSON.parse(fs.readFileSync(packagePath));
|
||||
packageJson = $tw.utils.parseJSONSafe(fs.readFileSync(packagePath));
|
||||
delete packageJson.includeWikis;
|
||||
fs.writeFileSync(packagePath,JSON.stringify(packageJson,null,$tw.config.preferences.jsonSpaces));
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user