From e9dfbed997977dfa6ec4968a650692fa8cf15c39 Mon Sep 17 00:00:00 2001 From: Brian Ford Date: Thu, 12 Jun 2014 12:02:08 -0700 Subject: [PATCH] fix: do not reconfig property descriptors of prototypes --- zone.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zone.js b/zone.js index 27a44d026..dc5b5bde8 100644 --- a/zone.js +++ b/zone.js @@ -524,7 +524,9 @@ Zone.patchDefineProperty = function () { if (isUnconfigurable(obj, prop)) { throw new TypeError('Cannot assign to read only property \'' + prop + '\' of ' + obj); } - desc = rewriteDescriptor(obj, prop, desc); + if (prop !== 'prototype') { + desc = rewriteDescriptor(obj, prop, desc); + } return _defineProperty(obj, prop, desc); };