Skip to content

Commit

Permalink
Use getResource("local.json") if running under RingoJS
Browse files Browse the repository at this point in the history
  • Loading branch information
allencblee committed Dec 8, 2012
1 parent 16aa238 commit d3db5c2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion util/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ if(!read){
read = require("file").read;
}
try{
var settings = JSON.parse(read("local.json").toString("utf8"));
var settings;
if (typeof java == "object") JSON.parse(getResource("local.json").content);
else JSON.parse(read("local.json").toString("utf8"));
for(var i in settings){
exports[i] = settings[i];
}
Expand Down

0 comments on commit d3db5c2

Please sign in to comment.