Skip to content

Commit

Permalink
fix(hog): bytecode starts with _H as well (#24610)
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusandra authored Aug 27, 2024
1 parent 3575a9e commit 26e3e0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugin-server/src/cdp/hog-executor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ const hogExecutionDuration = new Histogram({
export const formatInput = (bytecode: any, globals: HogFunctionInvocation['globals']): any => {
// Similar to how we generate the bytecode by iterating over the values,
// here we iterate over the object and replace the bytecode with the actual values
// bytecode is indicated as an array beginning with ["_h"]
// bytecode is indicated as an array beginning with ["_H"] (versions 1+) or ["_h"] (version 0)

if (Array.isArray(bytecode) && bytecode[0] === '_h') {
if (Array.isArray(bytecode) && (bytecode[0] === '_h' || bytecode[0] === '_H')) {
const res = exec(bytecode, {
globals,
timeout: DEFAULT_TIMEOUT_MS,
Expand Down

0 comments on commit 26e3e0e

Please sign in to comment.