Skip to content

Commit

Permalink
fix: mitigates console warning (#800)
Browse files Browse the repository at this point in the history
Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
  • Loading branch information
pedrolamas committed Aug 2, 2022
1 parent 1258b35 commit aa55234
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
21 changes: 14 additions & 7 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -215,15 +215,22 @@ export default class App extends Mixins(StateMixin) {
this.flashMessage.open = true
})
const legacyFavIcons = document.querySelectorAll("link[rel*='icon'][type='image/png']")
const legacyElementsSelectors = [
"link[rel*='icon'][type='image/png']",
"meta[name='theme-color']"
]
legacyFavIcons.forEach(item => {
const parentElement = item.parentElement
for (const legacyElementsSelector of legacyElementsSelectors) {
const legacyElements = document.querySelectorAll(legacyElementsSelector)
if (parentElement) {
parentElement.removeChild(item)
}
})
legacyElements.forEach(item => {
const parentElement = item.parentElement
if (parentElement) {
parentElement.removeChild(item)
}
})
}
}
handleToolsDrawerChange () {
Expand Down
2 changes: 1 addition & 1 deletion vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = defineConfig({
}
},
pwa: {
themeColor: '',
themeColor: '#2196F3',
msTileColor: '#000000',
appleMobileWebAppCache: 'yes',
manifestOptions: {
Expand Down

0 comments on commit aa55234

Please sign in to comment.