Files
klz-cables.com/.pnpm-store/v10/files/c1/1026f06c4c39b1695b5d6f91b006db8de9ea8c19908215b6e6fdc525a89d35ace3b7ef233cea63f0220832b1ba2617930eddd2c893d6c9247971d667fc4e58
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

22 lines
698 B
Plaintext

/**
*
* @deprecated use getObjectDotNotation from `'payload/shared'` instead of `'payload'`
*
* @example
*
* ```ts
* import { getObjectDotNotation } from 'payload/shared'
*
* const obj = { a: { b: { c: 42 } } }
* const value = getObjectDotNotation<number>(obj, 'a.b.c', 0) // value is 42
* const defaultValue = getObjectDotNotation<number>(obj, 'a.b.x', 0) // defaultValue is 0
* ```
*/ export const getObjectDotNotation = (obj, path, defaultValue)=>{
if (!path || !obj) {
return defaultValue;
}
const result = path.split('.').reduce((o, i)=>o?.[i], obj);
return result === undefined ? defaultValue : result;
};
//# sourceMappingURL=getObjectDotNotation.js.map