Pārlūkot izejas kodu

fix(aot): Unmount AlwaysOnTop to remove listeners (#2307)

master
hristoterezov 7 gadus atpakaļ
vecāks
revīzija
d6c3ab64fa
1 mainītis faili ar 4 papildinājumiem un 0 dzēšanām
  1. 4
    0
      react/features/always-on-top/index.js

+ 4
- 0
react/features/always-on-top/index.js Parādīt failu

8
     <AlwaysOnTop />,
8
     <AlwaysOnTop />,
9
     document.getElementById('react')
9
     document.getElementById('react')
10
 );
10
 );
11
+
12
+window.addEventListener('beforeunload', () => {
13
+    ReactDOM.unmountComponentAtNode(document.getElementById('react'));
14
+});

Notiek ielāde…
Atcelt
Saglabāt