Use 'process.env.NODE_ENV' instead of 'electron-is-dev' for spewing debug logs.
This commit is contained in:
parent
a20ea08ac7
commit
662778c47b
1 changed files with 1 additions and 2 deletions
|
@ -7,7 +7,6 @@ import videojs from 'video.js/dist/alt/video.core.novtt.min.js';
|
|||
import 'video.js/dist/alt/video-js-cdn.min.css';
|
||||
import eventTracking from 'videojs-event-tracking';
|
||||
import isUserTyping from 'util/detect-typing';
|
||||
import isDev from 'electron-is-dev';
|
||||
|
||||
export type Player = {
|
||||
on: (string, (any) => void) => void,
|
||||
|
@ -107,7 +106,7 @@ export default React.memo<Props>(function VideoJs(props: Props) {
|
|||
if (newState !== curState) {
|
||||
tapToUnmuteRef.current.style.visibility = newState ? 'visible' : 'hidden';
|
||||
}
|
||||
} else if (isDev) {
|
||||
} else if (process.env.NODE_ENV === 'development') {
|
||||
throw new Error('[videojs.jsx] Empty video ref should not happen');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue