@bytebrand/export-cars 1.23.0 → 1.23.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bytebrand/export-cars",
3
- "version": "1.23.0",
3
+ "version": "1.23.1",
4
4
  "description": "",
5
5
  "author": "bytebrand",
6
6
  "license": "UNLICENSED",
@@ -1,4 +1,4 @@
1
- import { escape, isString } from 'lodash';
1
+ import { escape, isNumber, isString } from 'lodash';
2
2
  import { XMLBuilderBase } from '@bytebrand/cronicle-helper';
3
3
  import { FacebookShopItem, FacebookShopTag } from '../interfaces';
4
4
 
@@ -25,7 +25,14 @@ export class FacebookShopXmlBuilder extends XMLBuilderBase {
25
25
  }
26
26
 
27
27
  buildTagElement(tag: string, params: FacebookShopTag) {
28
- const value = isString(params.value) ? escape(params.value) : params.value;
28
+ // getElement() treats falsy values as "missing" — stringify numbers first so a
29
+ // legitimate 0 (e.g. down_payment/apr) still renders instead of an empty tag.
30
+ let value = params.value;
31
+ if (isString(value)) {
32
+ value = escape(value);
33
+ } else if (isNumber(value)) {
34
+ value = String(value);
35
+ }
29
36
  if (params.isGoogle) {
30
37
  return this.getElement(`g:${tag}`, value);
31
38
  }
@@ -1,7 +1,7 @@
1
1
  import { Injectable } from '@nestjs/common';
2
2
 
3
3
  import { get, round, toString } from 'lodash';
4
- import moment from 'moment';
4
+ import * as moment from 'moment';
5
5
 
6
6
  import { de, deVehicleDetailsPage, deVehicleProps } from '@bytebrand/i18n-dictionaries';
7
7
  import { ImboImageResponseInterface } from '@bytebrand/chunkable';