Skip to content

Commit

Permalink
error for empty data
Browse files Browse the repository at this point in the history
  • Loading branch information
stan-donarise authored and blokhin committed Mar 26, 2024
1 parent 6610ad7 commit 019e34c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions matinfio/matinfio.web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ namespace $ {

/** Guessing what to do */
static detect_format( data: any ) {

if( !data ) throw new Error("Crystal data is empty");

if( typeof data === 'object' ) return 'OPTIMADE'

Expand Down

0 comments on commit 019e34c

Please sign in to comment.