Skip to content

Commit

Permalink
fix: bind function stopped working on Deno 1.31+ (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Huggins committed Apr 26, 2023
1 parent 9c3bff6 commit f6f6274
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion deps.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { dlopen, download } from "https://deno.land/x/[email protected].0-rc.3/mod.ts";
export { dlopen, download } from "https://deno.land/x/[email protected].2/mod.ts";
9 changes: 7 additions & 2 deletions src/webview.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/// <reference lib="deno.unstable" />
import { encodeCString, instances, lib } from "./ffi.ts";

/** Window size hints */
Expand Down Expand Up @@ -266,8 +267,12 @@ export class Webview {
reqPtr: Deno.PointerValue,
arg: Deno.PointerValue | null,
) => {
const seq = new Deno.UnsafePointerView(BigInt(seqPtr)).getCString();
const req = new Deno.UnsafePointerView(BigInt(reqPtr)).getCString();
const seq = seqPtr
? new Deno.UnsafePointerView(seqPtr).getCString()
: "";
const req = reqPtr
? new Deno.UnsafePointerView(reqPtr).getCString()
: "";
callback(seq, req, arg);
},
);
Expand Down

0 comments on commit f6f6274

Please sign in to comment.