Skip to content

Commit

Permalink
fix: prevent "webkitStorageInfo deprecation" warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Maizify committed Dec 24, 2020
1 parent dbe8a29 commit 7a1e9f0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dist/vconsole.min.js

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions src/log/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,15 @@ class VConsoleDefaultTab extends VConsoleLogTab {
const that = this;
super.onReady();

// do not traverse these keys to prevent "Deprecation" warning
const keyBlackList = ['webkitStorageInfo'];

window.winKeys = Object.getOwnPropertyNames(window).sort();
window.keyTypes = {};
for (let i = 0; i < winKeys.length; i++) {
if (keyBlackList.indexOf(winKeys[i]) > -1) {
continue;
}
keyTypes[winKeys[i]] = typeof window[winKeys[i]];
}

Expand Down

0 comments on commit 7a1e9f0

Please sign in to comment.