File tree 1 file changed +13
-2
lines changed
1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change 1
- import { InspectorOptions , createInspector } from './createInspector' ;
1
+ import {
2
+ InspectorOptions ,
3
+ createInspector ,
4
+ defaultInspectorOptions ,
5
+ } from './createInspector' ;
2
6
import { Adapter , StatelyInspectionEvent } from './types' ;
3
7
import WebSocket from 'isomorphic-ws' ;
4
8
import safeStringify from 'safe-stable-stringify' ;
@@ -32,7 +36,14 @@ export class WebSocketAdapter implements Adapter {
32
36
console . log ( 'websocket open' ) ;
33
37
this . status = 'open' ;
34
38
this . deferredEvents . forEach ( ( inspectionEvent ) => {
35
- const serializedEvent = this . options . serialize ( inspectionEvent ) ;
39
+ const preSerializedEvent = defaultInspectorOptions . serialize (
40
+ inspectionEvent ,
41
+ inspectionEvent
42
+ ) ;
43
+ const serializedEvent = this . options . serialize (
44
+ preSerializedEvent ,
45
+ inspectionEvent
46
+ ) ;
36
47
this . ws . send ( safeStringify ( serializedEvent ) ) ;
37
48
} ) ;
38
49
} ;
You can’t perform that action at this time.
0 commit comments