diff options
Diffstat (limited to 'src/components/services/content')
-rw-r--r-- | src/components/services/content/ServiceWebview.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/components/services/content/ServiceWebview.js b/src/components/services/content/ServiceWebview.js index 3ec0c3a67..f59205c0e 100644 --- a/src/components/services/content/ServiceWebview.js +++ b/src/components/services/content/ServiceWebview.js | |||
@@ -33,7 +33,7 @@ export default @observer class ServiceWebview extends Component { | |||
33 | }; | 33 | }; |
34 | 34 | ||
35 | componentDidMount() { | 35 | componentDidMount() { |
36 | autorun(() => { | 36 | this.autorunDisposer = autorun(() => { |
37 | if (this.props.service.isActive) { | 37 | if (this.props.service.isActive) { |
38 | this.setState({ forceRepaint: true }); | 38 | this.setState({ forceRepaint: true }); |
39 | setTimeout(() => { | 39 | setTimeout(() => { |
@@ -43,6 +43,10 @@ export default @observer class ServiceWebview extends Component { | |||
43 | }); | 43 | }); |
44 | } | 44 | } |
45 | 45 | ||
46 | componentWillUnmount() { | ||
47 | this.autorunDisposer(); | ||
48 | } | ||
49 | |||
46 | updateTargetUrl = (event) => { | 50 | updateTargetUrl = (event) => { |
47 | let visible = true; | 51 | let visible = true; |
48 | if (event.url === '' || event.url === '#') { | 52 | if (event.url === '' || event.url === '#') { |
@@ -54,6 +58,7 @@ export default @observer class ServiceWebview extends Component { | |||
54 | }); | 58 | }); |
55 | } | 59 | } |
56 | 60 | ||
61 | autorunDisposer = null; | ||
57 | webview = null; | 62 | webview = null; |
58 | 63 | ||
59 | render() { | 64 | render() { |