This commit is contained in:
@@ -305,8 +305,8 @@ export default {
|
||||
vm.$router.push({
|
||||
name: "home-reviews",
|
||||
params: {
|
||||
objectType: Number.parseInt(item.data.ayaType, 10),
|
||||
objectId: Number.parseInt(item.data.recordId, 10),
|
||||
objectType: window.$gz.util.stringToIntOrNull(item.data.ayaType),
|
||||
objectId: window.$gz.util.stringToIntOrNull(item.data.recordId),
|
||||
name: objName
|
||||
}
|
||||
});
|
||||
|
||||
@@ -607,6 +607,18 @@ export default {
|
||||
return obj === true || obj === false || typeof variable === "boolean";
|
||||
},
|
||||
///////////////////////////////////////////////
|
||||
// parse to number or null if not a number
|
||||
// used because route params can turn into strings
|
||||
// on their own
|
||||
//
|
||||
stringToIntOrNull: function(n) {
|
||||
const ret = Number.parseInt(n, 10);
|
||||
if (Number.isNaN(ret)) {
|
||||
return null;
|
||||
}
|
||||
return ret;
|
||||
},
|
||||
///////////////////////////////////////////////
|
||||
// Use geolocation api to attempt to get current location
|
||||
// try high accuracy first and downgrade if unavailable
|
||||
//https://www.openstreetmap.org/?mlat=48.3911&mlon=-124.7353#map=12/48.3910/-124.7353
|
||||
|
||||
Reference in New Issue
Block a user