Skip to content

Commit 4016c2c

Browse files
Fix error decoding on ts-binding
1 parent 68e6052 commit 4016c2c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

application/apps/rustcore/ts-bindings/src/api/session.provider.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ export class EventProvider extends Computation<
190190
SearchValuesUpdated: new Subject<IValuesMinMaxMap | null>(),
191191
SearchMapUpdated: new Subject<string>(),
192192
IndexedMapUpdated: new Subject<IEventIndexedMapUpdated>(),
193-
Progress: new Subject<IProgressEvent>(),
193+
Progress: new Subject<IProgressEvent>(), // This even isn't used. No listeners on ts side and never fires on rs side
194194
AttachmentsUpdated: new Subject<IAttachmentsUpdatedUpdated>(),
195195
SessionError: new Subject<IError>(),
196196
OperationError: new Subject<IErrorEvent>(),

application/apps/rustcore/ts-bindings/src/interfaces/errors.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ export class NativeError extends Error {
147147
try {
148148
if (smth instanceof Error) {
149149
return new NativeError(smth, Type.Other, Source.Other);
150-
} else if (smth instanceof Array) {
150+
} else if (smth instanceof Array || smth instanceof Buffer) {
151151
const deserialized: ty.ComputationError = proto.ComputationError.decode(
152152
Uint8Array.from(smth),
153153
);

0 commit comments

Comments
 (0)