Only convert price to local currency after document is ready
This commit is contained in:
@@ -66,9 +66,16 @@ export class Currency { // eslint-disable-line import/prefer-default-export
|
|||||||
this.setPrice();
|
this.setPrice();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getCountryCaller(position) {
|
||||||
|
const caller = function callerFunction() {
|
||||||
|
this.getCountry(position);
|
||||||
|
}.bind(this);
|
||||||
|
$(document).ready(caller);
|
||||||
|
}
|
||||||
|
|
||||||
getUserLocation() {
|
getUserLocation() {
|
||||||
// Get user location from browser
|
// Get user location from browser
|
||||||
navigator.geolocation.getCurrentPosition(this.getCountry.bind(this));
|
navigator.geolocation.getCurrentPosition(this.getCountryCaller.bind(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(skipInitialize) {
|
constructor(skipInitialize) {
|
||||||
|
|||||||
Reference in New Issue
Block a user