Skip to content

Commit

Permalink
handle ping without timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
kecnry committed Aug 31, 2023
1 parent 60ddb58 commit ce23950
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions jdaviz/core/template_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,10 @@ def user_api(self):
return PluginUserApi(self, expose=[])

def vue_plugin_ping(self, ping_timestamp):
if isinstance(ping_timestamp, dict):
# popout windows can sometimes ping but send an empty dictionary instead of the
# timestamp, in that case, let's set the latest ping time to now
ping_timestamp = time.time() * 1000
self._ping_timestamp = ping_timestamp

# we've received a ping, so immediately set plugin_opened state to True
Expand Down

0 comments on commit ce23950

Please sign in to comment.