vendor/assets/javascripts/ace/worker-xquery.js in ace-rails-ap-3.0.1 vs vendor/assets/javascripts/ace/worker-xquery.js in ace-rails-ap-3.0.2

- old
+ new

@@ -15,11 +15,17 @@ window.window = window; window.ace = window; window.onerror = function(message, file, line, col, err) { - console.error("Worker " + (err ? err.stack : message)); + postMessage({type: "error", data: { + message: message, + file: file, + line: line, + col: col, + stack: err.stack + }}); }; window.normalizeModule = function(parentId, moduleName) { // normalize plugin requires if (moduleName.indexOf("!") !== -1) { @@ -82,19 +88,24 @@ } else if (arguments.length == 1) { factory = id; deps = []; id = window.require.id; } + + if (typeof factory != "function") { + window.require.modules[id] = { + exports: factory, + initialized: true + }; + return; + } if (!deps.length) // If there is no dependencies, we inject 'require', 'exports' and // 'module' as dependencies, to provide CommonJS compatibility. deps = ['require', 'exports', 'module']; - if (id.indexOf("text!") === 0) - return; - var req = function(childId) { return window.require(id, childId); }; window.require.modules[id] = { @@ -1196,10 +1207,9 @@ }); return matches; }; exports.deferredCall = function(fcn) { - var timer = null; var callback = function() { timer = null; fcn(); };