Handle case where screensEnabled isn't available (in Snack)

This commit is contained in:
Brent Vatne
2018-10-10 13:11:30 -07:00
parent 84f22834f9
commit fd2966f67c

View File

@@ -14,7 +14,7 @@ const FAR_FAR_AWAY = 3000; // this should be big enough to move the whole view o
export default class ResourceSavingScene extends React.Component<Props> {
render() {
if (screensEnabled()) {
if (screensEnabled && screensEnabled()) {
const { isVisible, ...rest } = this.props;
return <Screen active={isVisible ? 1 : 0} {...rest} />;
}