Skip to content

Commit

Permalink
Read token directly from props allowing the token to be refreshed per…
Browse files Browse the repository at this point in the history
…iodically mid session.
  • Loading branch information
Zandor300 committed Feb 22, 2022
1 parent c1d56d5 commit 675bf66
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/AppleMaps.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import React, { Component } from 'react'

class AppleMaps extends Component {
componentDidMount() {
const { token, children, initialMapType } = this.props
const { children, initialMapType } = this.props
this.canvas = document.createElement('canvas')
this.canvas.id = 'currentLocationOverride'
mapkit.init({
authorizationCallback: function(done) {
done(token)
done(this.props.token)
}
})

Expand Down

0 comments on commit 675bf66

Please sign in to comment.