From 21e4ec1727aea9190d054546f41de119e6b955cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jannis=20Mo=C3=9Fhammer?= Date: Fri, 14 Jun 2013 09:50:06 +0200 Subject: [PATCH] Fix wrong variable name in requiremock's getDefine The getDefine method check's for existence of the 'arg' variable, which was renamed to 'name', causing the typeof arg === "undefined" to always return true refs #4308 --- test/js/testlib/requiremock.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/js/testlib/requiremock.js b/test/js/testlib/requiremock.js index 5bda50d18..8181092da 100644 --- a/test/js/testlib/requiremock.js +++ b/test/js/testlib/requiremock.js @@ -115,7 +115,7 @@ module.exports = { purgeDependencies: purgeDependencies, registerDependencies: registerDependencies, getDefine: function(name) { - if (typeof arg === "undefined") { + if (typeof name === "undefined") { return registeredDependencies.__define__; } else { return registeredDependencies[name];