Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit 77b4c0d

Browse files
robdodsonbtford
authored andcommitted
fix(zone): fix conflict with Polymer elements
I noticed when including Polymer 1.0 elements in an Angular 2 app, this line throws an error saying it can't find `value` of undefined. I've added a simple workaround which seems to fix the issue and (so far at least) doesn't seem to cause any additional issues with Polymer or Angular. cc @justinfagnani @addyosmani
1 parent 3d6dc08 commit 77b4c0d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: lib/patch/register-element.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function apply() {
2121
callbacks.forEach(function (callback) {
2222
if (opts.prototype.hasOwnProperty(callback)) {
2323
var descriptor = Object.getOwnPropertyDescriptor(opts.prototype, callback);
24-
if (descriptor.value) {
24+
if (descriptor && descriptor.value) {
2525
descriptor.value = global.zone.bind(descriptor.value);
2626
_redefineProperty(opts.prototype, callback, descriptor);
2727
} else {

0 commit comments

Comments
 (0)