fix register of undefined, #8249

This commit is contained in:
afc163 2017-11-21 18:58:58 +08:00
parent b6c6ee8f3e
commit b075aa606e

View File

@ -97,6 +97,9 @@ export function loadScript(src) {
export function enquireScreen(cb) {
/* eslint-disable no-unused-expressions */
// and (min-width: 320px)
if (!enquire) {
return;
}
enquire.register('only screen and (max-width: 768px)', {
match: () => {
cb && cb(true);