diff --git a/src/ng/compile.js b/src/ng/compile.js index dd0ac00b..387d6a40 100644 --- a/src/ng/compile.js +++ b/src/ng/compile.js @@ -2355,7 +2355,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { compile: function() { return { pre: function attrInterpolatePreLinkFn(scope, element, attr) { - var $$observers = (attr.$$observers || (attr.$$observers = createMap())); + var $$observers = (attr.$$observers || (attr.$$observers = {})); if (EVENT_HANDLER_ATTR_REGEXP.test(name)) { throw $compileMinErr('nodomevents', diff --git a/test/ng/compileSpec.js b/test/ng/compileSpec.js index 909daaf6..1e4717ad 100755 --- a/test/ng/compileSpec.js +++ b/test/ng/compileSpec.js @@ -3218,23 +3218,6 @@ describe('$compile', function() { }); }); - it('should be able to interpolate attribute names which are present in Object.prototype', function() { - var attrs; - module(function() { - directive('attrExposer', valueFn({ - link: function($scope, $element, $attrs) { - attrs = $attrs; - } - })); - }); - inject(function($compile, $rootScope) { - $compile('
')($rootScope); - $rootScope.$apply(); - expect(attrs.toString).toBe('2'); - expect(attrs.hasOwnProperty).toBe('2'); - }); - }); - describe('bind-once', function() {