add temp stub for shell.open on pdf viewer

This commit is contained in:
Sean Yesmunt 2019-03-22 00:51:27 -04:00
parent 8ef83bfe6c
commit a163091560

View file

@ -2,7 +2,9 @@
import * as React from 'react';
import { stopContextMenu } from 'util/context-menu';
import Button from 'component/button';
// @if TARGET='app'
import { shell } from 'electron';
// @endif
type Props = {
source: string,
@ -22,7 +24,12 @@ class PdfViewer extends React.PureComponent<Props> {
openFile() {
const { source } = this.props;
const path = `file://${source}`;
// @if TARGET='app'
shell.openExternal(path);
// @endif
// @if TARGET='web'
console.error('provide stub for shell.openExternal');
// @endif
}
render() {