fix types

This commit is contained in:
Andrea Vos 2024-09-11 17:48:40 +02:00
parent 5317425bd4
commit 5bf053c8b2
2 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@ const SAFARI_REGEX = /^((?!chrome|android).)*safari/i;
const plugin: Plugin = ({ req }, inject) => {
inject('isSafari', () => {
if (process.server && req) {
if (process.server && req && req.headers['user-agent']) {
return SAFARI_REGEX.test(req.headers['user-agent']);
}

View File

@ -219,7 +219,7 @@ export default hash.extend({
}
});
this.sources = await this.$axios.$get('/sources');
this.sourceLibrary = new SourceLibrary(this.$config, this.sources);
this.sourceLibrary = new SourceLibrary(this.$config, this.sources!);
},
methods: {
toId(str: string): string {