Skip to content

Commit dfa570b

Browse files
committed
Adjustments to handling of price field in contentMetadata.
1 parent 1f8354f commit dfa570b

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/branchUniversalObject.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,16 @@ export default async function createBranchUniversalObject(identifier, options =
1717
}
1818
}
1919

20-
// For the benefit of NSDecimalNumber on iOS.
21-
const price = contentMetadata.price === undefined ? undefined : '' + contentMetadata.price
22-
2320
const branchUniversalObject = {
2421
canonicalIdentifier: identifier,
25-
contentMetadata: {
26-
price: price,
27-
...contentMetadata
28-
},
22+
contentMetadata: contentMetadata,
2923
...options
3024
}
3125

26+
// For the benefit of NSDecimalNumber on iOS.
27+
const price = contentMetadata.price === undefined ? undefined : '' + contentMetadata.price
28+
branchUniversalObject.contentMetadata.price = price
29+
3230
if (options.automaticallyListOnSpotlight !== undefined) {
3331
console.info('[Branch] automaticallyListOnSpotlight is deprecated. Please use locallyIndex instead.')
3432
}

0 commit comments

Comments
 (0)