Browse Source

chore(react): Make tooltipstore forward compatible with v17rc (#20825)

* chore(react): Make tooltipstore forward compatible with v17rc

* Rename internals variable
k-fish 4 years ago
parent
commit
326bf89d9d
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/sentry/static/sentry/app/stores/tooltipStore.tsx

+ 3 - 1
src/sentry/static/sentry/app/stores/tooltipStore.tsx

@@ -16,9 +16,11 @@ const TooltipStore: TooltipStoreInterface = {
   getOpenableSingleTooltips() {
     return this.tooltips.filter(tooltip => {
       // Filtering out disabled tooltips and lists of tooltips (which cause rendering issues for snapshots) using the internal 'key'
+      const _internals =
+        (tooltip as any)._reactInternalFiber || (tooltip as any)._reactInternals;
       return (
         !(tooltip.props as any).disabled &&
-        !(tooltip as any)._reactInternalFiber.key &&
+        !_internals.key &&
         !(tooltip.props as any).disableForVisualTest
       );
     });