diff --git a/lib/Utils.js b/lib/Utils.js index 5a722c4..ed1c641 100644 --- a/lib/Utils.js +++ b/lib/Utils.js @@ -311,8 +311,16 @@ Utils = (function() { static getStringFromFile(path, callback = null) { var data, fs, j, len1, name, ref, req, xhr; + var urlFlag = true; + fs = require('fs'); xhr = null; if (typeof window !== "undefined" && window !== null) { + if(window.origin.includes('localhost') && fs.existsSync(path)) + { + urlFlag = false; + } + } + if (urlFlag) { if (window.XMLHttpRequest) { xhr = new XMLHttpRequest(); } else if (window.ActiveXObject) {