mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-08 14:35:03 +00:00
Fix: res.setBody fails for Object in Developer-mode
vm2 returns a recursive Proxy for accessing the return value which cannot be serialized for IPC using `structuredClone`. Co-authored-by: ramki-bruno <ramki@usebruno.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
const { get } = require('@usebruno/query');
|
||||
const _ = require('lodash');
|
||||
|
||||
class BrunoResponse {
|
||||
constructor(res) {
|
||||
@@ -46,8 +47,9 @@ class BrunoResponse {
|
||||
return;
|
||||
}
|
||||
|
||||
this.body = data;
|
||||
this.res.data = data;
|
||||
const clonedData = _.cloneDeep(data);
|
||||
this.res.data = clonedData;
|
||||
this.body = clonedData;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user