We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 33335a4 commit 5d82843Copy full SHA for 5d82843
1 file changed
app/components/DropZone.jsx
@@ -12,7 +12,9 @@ class DropZone extends Component {
12
13
constructor(props) {
14
super(props);
15
- Notification.requestPermission();
+ if ('Notification' in window) {
16
+ Notification.requestPermission();
17
+ }
18
19
// For a full list of possible configurations,
20
// please consult http://www.dropzonejs.com/#configuration
@@ -33,7 +35,7 @@ class DropZone extends Component {
33
35
success = (file, path) => {
34
36
FilesActions.updateFileList(path);
37
const body = `Filename : ${file.name}`;
- if(Notification.permission === 'granted') {
38
+ if('Notification' in window && Notification.permission === 'granted') {
39
new Notification('File uploaded successfully',{ body , icon });
40
}
41
0 commit comments