From 13b572927b23f5134fba5757faecccf6159fb202 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Tue, 3 Jul 2012 13:26:24 -0500 Subject: [PATCH] Reduce moduleUrl conditional --- lib/ace/config.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/ace/config.js b/lib/ace/config.js index bfb9e797..66818587 100644 --- a/lib/ace/config.js +++ b/lib/ace/config.js @@ -78,13 +78,7 @@ exports.moduleUrl = function(name) { var component = parts[1]; var base = parts[2]; - if (component === "mode") { - return this.get("modePath") + "/mode-" + base + this.get("suffix"); - } else if (component === "theme") { - return this.get("themePath") + "/theme-" + base + this.get("suffix"); - } else if (component === "worker") { - return this.get("workerPath") + "/worker-" + base + this.get("suffix"); - } + return this.get(component + "Path") + "/" + component + "-" + base + this.get("suffix"); }; exports.init = function() {