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

Commit

Permalink
fix(zone): fix conflict with Polymer elements
Browse files Browse the repository at this point in the history
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
  • Loading branch information
robdodson authored and btford committed Aug 31, 2015
1 parent 3d6dc08 commit 77b4c0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/patch/register-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function apply() {
callbacks.forEach(function (callback) {
if (opts.prototype.hasOwnProperty(callback)) {
var descriptor = Object.getOwnPropertyDescriptor(opts.prototype, callback);
if (descriptor.value) {
if (descriptor && descriptor.value) {
descriptor.value = global.zone.bind(descriptor.value);
_redefineProperty(opts.prototype, callback, descriptor);
} else {
Expand Down

0 comments on commit 77b4c0d

Please sign in to comment.