Catch undefined Notification for IE
Notification is not defined on IE. Also it is better to put javascript in the js files. issue7683 review54341002
This commit is contained in:
1 parent
4f9d43bde4
commit
7ea5b47630
3 files changed
+12
-3
No files matched your search
+6
-1
@@ -59,7 +59,12 @@
|
||||
|
||||
Sao.Bus.handle = function(message) {
|
||||
var notify = function(message) {
|
||||
if (Notification.permission != "granted") {
|
||||
try {
|
||||
if (Notification.permission != "granted") {
|
||||
return;
|
||||
}
|
||||
} catch (e) {
|
||||
(console.error || console.log).call(console, e, e.stack);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1003,6 +1003,12 @@ var Sao = {};
|
||||
|
||||
jQuery(document).ready(function() {
|
||||
set_shortcuts();
|
||||
try {
|
||||
Notification.requestPermission();
|
||||
} catch (e) {
|
||||
(console.error || console.log).call(console, e, e.stack);
|
||||
}
|
||||
Sao.login();
|
||||
});
|
||||
|
||||
function set_shortcuts() {
|
||||
|
||||
Reference in new issue
Block a user