Skip to content

Commit

Permalink
Fix can not switch tab bug on Android 4.4 (Android 4.4 dose not suppo…
Browse files Browse the repository at this point in the history
…rt Array.from)
  • Loading branch information
wangzhengbo2 committed Oct 4, 2019
1 parent 6ecbff8 commit 23d6551
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dist/vconsole.min.js

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions src/lib/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@ import render from '../lib/mito.js';

const $ = {};

if (!Array.from) {
Array.from = function(collection) {
const arr = [];

for (let i = 0; i < collection.length; i++) {
arr.push(collection[i]);
}

return arr;
}
}

/**
* get single element
* @public
Expand Down

0 comments on commit 23d6551

Please sign in to comment.