Merge pull request #1571 from marcelklehr/fix/settings-object-prototype

Fix settings object having constructors of another vm.context
pull/1576/merge
John McLear 2013-02-28 07:20:42 -08:00
commit 13c9b66e6e
1 changed files with 1 additions and 0 deletions

View File

@ -157,6 +157,7 @@ exports.reloadSettings = function reloadSettings() {
try {
if(settingsStr) {
settings = vm.runInContext('exports = '+settingsStr, vm.createContext(), "settings.json");
settings = JSON.parse(JSON.stringify(settings)) // fix objects having constructors of other vm.context
}
}catch(e){
console.error('There was an error processing your settings.json file: '+e.message);