Skip to content

Commit

Permalink
Fix DataStream.open() crash
Browse files Browse the repository at this point in the history
Also renamed the function to DataStream.fromFile() for consistency with
its parent class.  No documentation update needed since this is an
undocumented function.
  • Loading branch information
fatcerberus committed Feb 20, 2020
1 parent 07eaa54 commit cc83249
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions assets/system/runtime/data-stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ class DataStream extends FileStream
{
get [Symbol.toStringTag]() { return 'DataStream'; }

static async open(fileName, fileOp)
static async fromFile(fileName, fileOp)
{
let fs = await FileStream.open(fileName, fileOp);
let fs = await FileStream.fromFile(fileName, fileOp);
Object.setPrototypeOf(fs, this.prototype);
fs._textDecoder = new TextDecoder('utf-8');
fs._textEncoder = new TextEncoder();
Expand Down

0 comments on commit cc83249

Please sign in to comment.