We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent efaa300 commit 6a077d3Copy full SHA for 6a077d3
src/functions/datastore-integration-webflow/index.js
@@ -510,11 +510,12 @@ function outOfStockItems(values) {
510
* @returns {any} the value stored in the key
511
*/
512
function iGet(object, key) {
513
+ const objectData = object && object.fieldData ? object.fieldData : object;
514
const numbered = new RegExp(key.toLowerCase().trim()+'(-\\d+)?');
- const existingKey = Object.keys(object.fieldData)
515
+ const existingKey = Object.keys(objectData)
516
.filter((k) => k.toLowerCase().trim().match(numbered))
517
.sort();
- return object[existingKey[0]];
518
+ return objectData[existingKey[0]];
519
}
520
521
module.exports = {
0 commit comments