Files
klz-cables.com/.pnpm-store/v10/files/a0/dfc68b04403004bbd2e6e7c6deb757226961606cc50340c9e950a36b092c5a41c60c22e8821cc2c3e1556775ad83d54f659d1a39cbffc0a46a6f0c75608506
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

20 lines
824 B
Plaintext

import { getDefaultValue } from '../../getDefaultValue.js';
import { cloneDataFromOriginalDoc } from '../beforeChange/cloneDataFromOriginalDoc.js';
export async function getFallbackValue({ field, req, siblingDoc }) {
let fallbackValue = undefined;
if ('name' in field && field.name) {
if (typeof siblingDoc[field.name] !== 'undefined') {
fallbackValue = cloneDataFromOriginalDoc(siblingDoc[field.name]);
} else if ('defaultValue' in field && typeof field.defaultValue !== 'undefined') {
fallbackValue = await getDefaultValue({
defaultValue: field.defaultValue,
locale: req.locale || '',
req,
user: req.user
});
}
}
return fallbackValue;
}
//# sourceMappingURL=getFallbackValue.js.map