export default {
name: 'AuthCallback',
data() {
return {
accessToken: null,
}
},
mounted() {
const tokenParseRegex: RegExp = /access_token=(.*?)&/;
const idParseRegex: RegExp = /user_id(.*?)/;
const exAccessToken: RegExpMatchArray | null = useRoute().hash.match(tokenParseRegex);
this.data().accessToken = exAccessToken![1];
}
}
this.data().accessToken = exAccessToken![1] - What is causing the error "The type "string" cannot be assigned to the type "null"" on this line? Additionally, it seems that in the console, this.data is not recognized as a function.