Hanks10100 closed pull request #1992: [jsfm] fix: judge if event is not defined
URL: https://github.com/apache/incubator-weex/pull/1992
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/runtime/bridge/receiver.js b/runtime/bridge/receiver.js
index 22b29f2bac..c24cfffce8 100644
--- a/runtime/bridge/receiver.js
+++ b/runtime/bridge/receiver.js
@@ -23,7 +23,7 @@ function fireEvent (document, nodeId, type, event, 
domChanges, params) {
   const el = document.getRef(nodeId)
   if (el) {
     return document.fireEvent(el, type, event, domChanges, params)
-  } else {
+  } else if (event) {
     event._nodeId = nodeId
     return document.fireEvent(document.getRef('_documentElement'), type, 
event, domChanges, params)
   }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to