Skip to content

Commit

Permalink
Don't Array convert when creating an R raw vector
Browse files Browse the repository at this point in the history
This was a workaround required for constructing R atomic
vectors from webR, and is no longer required.
  • Loading branch information
georgestagg committed Jul 18, 2024
1 parent c1e5d88 commit 68c68a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/messageporthttp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ async function handleHttpuvRequests(
// send it to httpuv
if (!request.more_body) {
try {
const bytes = await new shelter.RRaw(Array.from(body));
const bytes = await new shelter.RRaw(body);
const env = await new shelter.REnvironment({ bytes, appName });
const httpuvResp = await webRProxy.webR.evalR(
`
Expand Down Expand Up @@ -354,7 +354,7 @@ async function handleHttpuvRequests(
if (file) {
const filename = await file.toString();
const content = await webRProxy.webR.FS.readFile(filename);
const raw = await new shelter.RRaw(Array.from(content));
const raw = await new shelter.RRaw(content);
resp = (await httpuvResp.set("body", raw)) as RList;
}
}
Expand Down

0 comments on commit 68c68a2

Please sign in to comment.