We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fe609e7 commit 148b3f6Copy full SHA for 148b3f6
src/index.ts
@@ -1,3 +1,4 @@
1
+import type chrome from 'chrome';
2
import type { Component } from 'vue';
3
import type { DefineComponent, WebComponents } from '~/web/define-component';
4
@@ -11,3 +12,9 @@ type TraktExtension = {
11
12
};
13
14
export type { TraktExtension, DefineComponent, WebComponents };
15
+
16
+declare global {
17
+ interface Window {
18
+ chrome: typeof chrome;
19
+ }
20
+}
src/utils/i18n.utils.ts
@@ -6,7 +6,7 @@ import { useI18nStore } from '~/stores/i18n.store';
6
import { useRouterStore } from '~/stores/router.store';
7
8
export const useI18n = (...roots: string[]): ReturnType<typeof chromeUseI18n> => {
9
- if (!chrome?.i18n) {
+ if (!window?.chrome?.i18n) {
10
const store = useI18nStore();
const router = useRouterStore();
0 commit comments