check navigator variable for existence

throws error while try to prerender the page, using preact-cli for example
pull/16/head
Egor Sharapov 7 years ago committed by 小弟调调™
parent ed8b6b8b42
commit 7311320d76

@ -17,7 +17,7 @@ if (!Array.prototype.lastIndexOf) {
} }
var _api, // 对外API var _api, // 对外API
isff = navigator.userAgent.toLowerCase().indexOf('firefox') > 0, isff = typeof navigator !== 'undefined' ? navigator.userAgent.toLowerCase().indexOf('firefox') > 0 : false,
_keyMap = { // 特殊键 _keyMap = { // 特殊键
backspace: 8, tab: 9, clear: 12, backspace: 8, tab: 9, clear: 12,
enter: 13, 'return': 13, enter: 13, 'return': 13,

Loading…
Cancel
Save