summaryrefslogtreecommitdiffstats
path: root/js/vendor/angular/angular.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/vendor/angular/angular.js')
-rw-r--r--js/vendor/angular/angular.js49
1 files changed, 25 insertions, 24 deletions
diff --git a/js/vendor/angular/angular.js b/js/vendor/angular/angular.js
index 8204cf35f..2445ab55e 100644
--- a/js/vendor/angular/angular.js
+++ b/js/vendor/angular/angular.js
@@ -1,5 +1,5 @@
/**
- * @license AngularJS v1.3.19
+ * @license AngularJS v1.3.20
* (c) 2010-2014 Google, Inc. http://angularjs.org
* License: MIT
*/
@@ -54,7 +54,7 @@ function minErr(module, ErrorConstructor) {
return match;
});
- message = message + '\nhttp://errors.angularjs.org/1.3.19/' +
+ message = message + '\nhttp://errors.angularjs.org/1.3.20/' +
(module ? module + '/' : '') + code;
for (i = 2; i < arguments.length; i++) {
message = message + (i == 2 ? '?' : '&') + 'p' + (i - 2) + '=' +
@@ -2139,11 +2139,11 @@ function toDebugString(obj) {
* - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat".
*/
var version = {
- full: '1.3.19', // all of these placeholder strings will be replaced by grunt's
+ full: '1.3.20', // all of these placeholder strings will be replaced by grunt's
major: 1, // package task
minor: 3,
- dot: 19,
- codeName: 'glutinous-shriek'
+ dot: 20,
+ codeName: 'shallow-translucence'
};
@@ -6518,14 +6518,6 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
return bindings;
}
- function assertValidDirectiveName(name) {
- var letter = name.charAt(0);
- if (!letter || letter !== lowercase(letter)) {
- throw $compileMinErr('baddir', "Directive name '{0}' is invalid. The first character must be a lowercase letter", name);
- }
- return name;
- }
-
/**
* @ngdoc method
* @name $compileProvider#directive
@@ -6544,7 +6536,6 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
this.directive = function registerDirective(name, directiveFactory) {
assertNotHasOwnProperty(name, 'directive');
if (isString(name)) {
- assertValidDirectiveName(name);
assertArg(directiveFactory, 'directiveFactory');
if (!hasDirectives.hasOwnProperty(name)) {
hasDirectives[name] = [];
@@ -11763,20 +11754,30 @@ var $parseMinErr = minErr('$parse');
function ensureSafeMemberName(name, fullExpression) {
+ if (name === "__defineGetter__" || name === "__defineSetter__"
+ || name === "__lookupGetter__" || name === "__lookupSetter__"
+ || name === "__proto__") {
+ throw $parseMinErr('isecfld',
+ 'Attempting to access a disallowed field in Angular expressions! '
+ + 'Expression: {0}', fullExpression);
+ }
+ return name;
+}
+
+function getStringValue(name, fullExpression) {
// From the JavaScript docs:
// Property names must be strings. This means that non-string objects cannot be used
// as keys in an object. Any non-string object, including a number, is typecasted
// into a string via the toString method.
//
// So, to ensure that we are checking the same `name` that JavaScript would use,
- // we cast it to a string, if possible
- name = (isObject(name) && name.toString) ? name.toString() : name;
-
- if (name === "__defineGetter__" || name === "__defineSetter__"
- || name === "__lookupGetter__" || name === "__lookupSetter__"
- || name === "__proto__") {
- throw $parseMinErr('isecfld',
- 'Attempting to access a disallowed field in Angular expressions! '
+ // we cast it to a string, if possible.
+ // Doing `name + ''` can cause a repl error if the result to `toString` is not a string,
+ // this is, this will handle objects that misbehave.
+ name = name + '';
+ if (!isString(name)) {
+ throw $parseMinErr('iseccst',
+ 'Cannot convert object to primitive value! '
+ 'Expression: {0}', fullExpression);
}
return name;
@@ -12423,7 +12424,7 @@ Parser.prototype = {
return extend(function $parseObjectIndex(self, locals) {
var o = obj(self, locals),
- i = indexFn(self, locals),
+ i = getStringValue(indexFn(self, locals), expression),
v;
ensureSafeMemberName(i, expression);
@@ -12432,7 +12433,7 @@ Parser.prototype = {
return v;
}, {
assign: function(self, value, locals) {
- var key = ensureSafeMemberName(indexFn(self, locals), expression);
+ var key = ensureSafeMemberName(getStringValue(indexFn(self, locals), expression), expression);
// prevent overwriting of Function.constructor which would break ensureSafeObject check
var o = ensureSafeObject(obj(self, locals), expression);
if (!o) obj.assign(self, o = {}, locals);