decord/source/__polyfill/10xxx/module_10894.js
github-actions da5b5e5efe chore: update source for alpha 346.6
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
2026-09-12 13:45:10 +00:00

40 lines
1.1 KiB
JavaScript

// Module ID: 10894
// Function ID: 10895
// Dependencies: [19]
// Exports: usePropsErrorBoundary
// Module 10894
import noop from "module_19" /* 19 */;
export const usePropsErrorBoundary = function usePropsErrorBoundary(arg0) {
closure_0 = arg0;
const items = [arg0];
const effect = noop.useEffect(() => {
const size = closure_0;
({ defaultIndex, dataLength } = closure_0);
if (typeof defaultIndex === "number") {
if (dataLength > 0) {
const _Error3 = Error;
const error = new Error("DefaultIndex must be in the range of data length.");
throw error;
}
}
if (!size.mode) {
if (!size.vertical) {
if (!size.width) {
const _Error = Error;
const error1 = new Error("`width` must be specified for horizontal carousels.");
throw error1;
}
}
if (size.vertical) {
if (!size.height) {
const _Error2 = Error;
const error2 = new Error("`height` must be specified for vertical carousels.");
throw error2;
}
}
}
}, items);
};