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] - Whats wrong with this line? Error is The type "string" cannot be assigned to the type "null". and in console this.data is not a function