aboutsummaryrefslogtreecommitdiffstats
path: root/src/minErr.js
diff options
context:
space:
mode:
authorIgor Minar2013-07-01 17:23:24 -0700
committerIgor Minar2013-07-02 11:05:30 -0700
commit4f0f2437712a5ae3e79780e2d6fa32b70abe1a52 (patch)
tree7df06087f943728120c66052b23ffd8bb109e5cc /src/minErr.js
parent48eb297c1130fd08b22ba2bae032d3a5339c8615 (diff)
downloadangular.js-4f0f2437712a5ae3e79780e2d6fa32b70abe1a52.tar.bz2
fix($injector): refactor module loading code and use minErr
Diffstat (limited to 'src/minErr.js')
-rw-r--r--src/minErr.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/minErr.js b/src/minErr.js
index b6c447ca..89be9b1b 100644
--- a/src/minErr.js
+++ b/src/minErr.js
@@ -3,7 +3,7 @@
/**
* @description
*
- * This object provides a utility for producing rich Error messages within
+ * This object provides a utility for producing rich Error messages within
* Angular. It can be called as follows:
*
* var exampleMinErr = minErr('example');
@@ -34,14 +34,14 @@ function minErr(module) {
template = arguments[1],
templateArgs = arguments,
message;
-
+
message = prefix + template.replace(/\{\d+\}/g, function (match) {
var index = +match.slice(1, -1), arg;
if (index + 2 < templateArgs.length) {
arg = templateArgs[index + 2];
if (isFunction(arg)) {
- return arg.toString().replace(/ \{[\s\S]*$/, '');
+ return arg.toString().replace(/ ?\{[\s\S]*$/, '');
} else if (isUndefined(arg)) {
return 'undefined';
} else if (!isString(arg)) {