Skip to content

Commit

Permalink
fix: #2302
Browse files Browse the repository at this point in the history
  • Loading branch information
BANG88 committed Feb 7, 2018
1 parent d23de3e commit e3f792c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions components/image-picker/index.tsx
Expand Up @@ -28,7 +28,7 @@ export default class ImagePicker extends React.Component<
accept: 'image/*',
};

fileSelectorInput: any;
fileSelectorInput: HTMLInputElement | null;

// http://stackoverflow.com/questions/7584794/accessing-jpeg-exif-rotation-data-in-javascript-on-the-client-side
getOrientation = (file: any, callback: (_: number) => void) => {
Expand Down Expand Up @@ -120,7 +120,9 @@ export default class ImagePicker extends React.Component<
this.parseFile(files[i], i);
}
}
fileSelectorEl.value = '';
if (fileSelectorEl) {
fileSelectorEl.value = '';
}
}

parseFile = (file: any, index: number) => {
Expand Down

0 comments on commit e3f792c

Please sign in to comment.