decord/source/6670_useStableMemo.js
2026-07-20 16:05:17 +00:00

22 lines
556 B
JavaScript

// Module ID: 6670
// Function ID: 51332
// Name: useStableMemo
// Dependencies: []
// Exports: default
// Module 6670 (useStableMemo)
const useRef = require(dependencyMap[0]).useRef;
let closure_3 = [];
export default function useStableMemo(arg0, items) {
const tmp = useRef();
const tmp2 = useRef(closure_3);
if (tmp2.current === closure_3) {
tmp.current = arg0();
tmp2.current = items;
} else if (!importDefault(dependencyMap[1])(items, tmp2.current)) {
tmp.current = arg0();
tmp2.current = items;
}
return tmp.current;
};