Skip to content
Discussion options

You must be logged in to vote

href.match - return array, so:

getId() {
return this.homeCard.return_href().then((href) => {
const apId = href.match(/\d+$|\d*?/)[0] as undefined as string
return (apId.replace(/?$/, ''))
})
}

will be work, i wait only one match.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by vbukin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant