Skip to content

Commit

Permalink
Handle the undefined Interface in the proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
zpao committed Mar 4, 2016
1 parent 36798f7 commit e8cc613
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/renderers/dom/client/syntheticEvents/SyntheticEvent.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,13 @@ if (__DEV__) {
apply: function(constructor, that, args) {
return new Proxy(constructor.apply(that, args), {
set: function(target, prop, value) {
// target.constructor.Interface isn't defined when we create a base
// SyntheticEvent (eg, when handling load), so just fall back to the
// handling that explicitly.
// TODO: fix that
var iface = target.constructor.Interface || EventInterface;
if (prop !== 'isPersistent' &&
!target.constructor.Interface.hasOwnProperty(prop) &&
!iface.hasOwnProperty(prop) &&
shouldBeReleasedProperties.indexOf(prop) === -1) {
warning(
didWarnForAddedNewProperty || target.isPersistent(),
Expand Down

0 comments on commit e8cc613

Please sign in to comment.