File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import CONSTANT from "../constant";
66const dispatchGlobalEvent = ( eventName , opts ) => {
77 // Compatible with IE
88 // @see http://stackoverflow.com/questions/26596123/internet-explorer-9-10-11-event-constructor-doesnt-work
9+ // @see https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent
910 let event ;
1011
1112 if ( typeof window . CustomEvent === "function" ) {
@@ -52,10 +53,11 @@ export default function(target) {
5253
5354 target . prototype . globalShow = function ( event ) {
5455 if ( this . mount ) {
56+ const hasTarget =
57+ ( event && event . detail && event . detail . target && true ) || false ;
5558 // Create a fake event, specific show will limit the type to `solid`
5659 // only `float` type cares e.clientX e.clientY
57- const e = { currentTarget : event . detail . target } ;
58- this . showTooltip ( e , true ) ;
60+ this . showTooltip ( { currentTarget : hasTarget && event . detail . target } , true ) ;
5961 }
6062 } ;
6163
You can’t perform that action at this time.
0 commit comments