Skip to content

Commit 184ac49

Browse files
committed
fix: address review points
1 parent 968446e commit 184ac49

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • packages/scratch-gui/src/components/cards

packages/scratch-gui/src/components/cards/cards.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import PropTypes from 'prop-types';
2-
import React, {Fragment, useRef, useEffect} from 'react';
2+
import React, {Fragment} from 'react';
33
import classNames from 'classnames';
44
import {FormattedMessage} from 'react-intl';
55
import Draggable from 'react-draggable';
@@ -142,9 +142,9 @@ class VideoStep extends React.Component {
142142
const script2 = document.getElementById('wistia-video-api');
143143
script2.parentNode.removeChild(script2);
144144

145-
// Clear the _wq queue to prevent old callbacks from firing
145+
// Clean up the _wq queue to prevent old callbacks from firing
146146
// if the component is unmounted before the video is ready
147-
window._wq = [];
147+
window._wq = window._wq.filter(video => video.id !== this.props.video);
148148
}
149149

150150
render () {

0 commit comments

Comments
 (0)