Skip to content

Commit

Permalink
fix: Fix function expression lifting in bindings (#2255)
Browse files Browse the repository at this point in the history
  • Loading branch information
technohippy committed Apr 9, 2022
1 parent 33055b2 commit f79b82e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/bindings/js.ts
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,7 @@ export class JSBuilder extends ExportsWalker {
/** Lifts a WebAssembly value to a JavaScript value. */
makeLiftFromValue(name: string, type: Type, sb: string[] = this.sb): void {
if (type.isInternalReference) {
const clazz = assert(type.getClass());
const clazz = assert(type.getClassOrWrapper(this.program));
if (clazz.extends(this.program.arrayBufferInstance.prototype)) {
sb.push("__liftBuffer(");
this.needsLiftBuffer = true;
Expand Down
2 changes: 1 addition & 1 deletion src/bindings/tsd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ export class TSDBuilder extends ExportsWalker {
toTypeScriptType(type: Type, mode: Mode): string {
if (type.isInternalReference) {
const sb = new Array<string>();
const clazz = assert(type.getClass());
const clazz = assert(type.getClassOrWrapper(this.program));
if (clazz.extends(this.program.arrayBufferInstance.prototype)) {
sb.push("ArrayBuffer");
} else if (clazz.extends(this.program.stringInstance.prototype)) {
Expand Down

0 comments on commit f79b82e

Please sign in to comment.