Untitled
unknown
plain_text
a year ago
767 B
2
Indexable
Never
function getReactProduct(reactObject) { if (Insider.fns.isObject(((reactObject.pendingProps || {}).checkoutStore || {}).bagStore)) { if (typeof reactObject.pendingProps.checkoutStore.bagStore.addItem === 'function') { Insider.__external.addToCartFunction = reactObject.pendingProps.checkoutStore.bagStore.addItem; } } else if (Insider.fns.isObject(reactObject.return)) { getReactProduct(reactObject.return); } } var reactElement = Insider.dom('#__next > div').nodes[0] || {}; var reactSelector = Object.keys(reactElement).filter(function (props) { return props.indexOf('__reactInternalInstance') !== -1; })[0] || '';