mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 13:07:08 +00:00
Add data integrity check
This commit is contained in:
@@ -627,6 +627,9 @@ export default {
|
|||||||
if (!firstBundle.chunks || typeof firstBundle.chunks !== 'function') {
|
if (!firstBundle.chunks || typeof firstBundle.chunks !== 'function') {
|
||||||
throw new Error('Invalid DougalBinaryBundle: chunks method missing');
|
throw new Error('Invalid DougalBinaryBundle: chunks method missing');
|
||||||
}
|
}
|
||||||
|
if (!firstBundle.chunks().length) {
|
||||||
|
throw new Error('Invalid DougalBinaryBundle: bundle has no chunks');
|
||||||
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('Failed to process first sequence:', e);
|
console.error('Failed to process first sequence:', e);
|
||||||
return { positions: new Float32Array(0), values: [], udv: 2 };
|
return { positions: new Float32Array(0), values: [], udv: 2 };
|
||||||
|
|||||||
Reference in New Issue
Block a user