This commit is contained in:
@ -19,7 +19,13 @@ async function fetchPropertyForMeta(id) {
|
||||
function mapProperty(item) {
|
||||
const info = item.propertyInformation || item.PropertyInformation || {};
|
||||
let details = {};
|
||||
try { details = JSON.parse(info.detailsJSON || info.DetailsJSON || '{}'); } catch {}
|
||||
if (typeof info.detailsJSON === 'object' && info.detailsJSON) {
|
||||
details = info.detailsJSON;
|
||||
} else if (typeof info.DetailsJSON === 'object' && info.DetailsJSON) {
|
||||
details = info.DetailsJSON;
|
||||
} else {
|
||||
try { details = JSON.parse(info.detailsJSON || info.DetailsJSON || '{}'); } catch {}
|
||||
}
|
||||
|
||||
const price = item.monthlyRent || item.MonthlyRent || item.dailyRent || item.DailyRent || 0;
|
||||
const priceUnit = item.monthlyRent || item.MonthlyRent ? 'monthly' : 'daily';
|
||||
|
||||
Reference in New Issue
Block a user