Skip to content

Commit

Permalink
fix default export must be CifParser (backwards compatibility)
Browse files Browse the repository at this point in the history
  • Loading branch information
papillot committed Apr 28, 2024
1 parent 13d9668 commit 3de3ffd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/parser/cif-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -887,10 +887,9 @@ class CifParser extends StructureParser {
const frames = s.frames
let currentFrame: NumberArray
let currentCoord: number


//
const data = this.isBinary ? CIF.parseBinary(this.streamer.data) : CIF.parseText(this.streamer.data)
const data = this.streamer.isBinary() ? CIF.parseBinary(this.streamer.data) : CIF.parseText(this.streamer.data)
const parsed = await data.run()
if (parsed.isError) {
throw parsed;
Expand Down Expand Up @@ -1146,4 +1145,4 @@ ParserRegistry.add('cif', CifParser)
ParserRegistry.add('mcif', CifParser)
ParserRegistry.add('mmcif', CifParser)

export default BinaryCifParser
export default CifParser

0 comments on commit 3de3ffd

Please sign in to comment.