Commit f015682d by Matthew Piatetsky

Only convert price to local currency after document is ready

parent c1292383
......@@ -66,9 +66,16 @@ export class Currency { // eslint-disable-line import/prefer-default-export
this.setPrice();
}
getCountryCaller(position) {
const caller = function callerFunction() {
this.getCountry(position);
}.bind(this);
$(document).ready(caller);
}
getUserLocation() {
// Get user location from browser
navigator.geolocation.getCurrentPosition(this.getCountry.bind(this));
navigator.geolocation.getCurrentPosition(this.getCountryCaller.bind(this));
}
constructor(skipInitialize) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment