(snapshot, safeIndex)
| 981 | }; |
| 982 | |
| 983 | const applySnapshotChange = async (snapshot, safeIndex) => { |
| 984 | if (typeof options.onSnapshotChange !== "function") return; |
| 985 | setLoading(true); |
| 986 | try { |
| 987 | await options.onSnapshotChange(snapshot, safeIndex); |
| 988 | } finally { |
| 989 | setLoading(false); |
| 990 | } |
| 991 | }; |
| 992 | |
| 993 | const setActiveIndex = async (index, { emit = false, force = false } = {}) => { |
| 994 | if (!Number.isFinite(index)) return null; |
no test coverage detected