Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core) fix missing return values issue #577

Merged
merged 1 commit into from
Oct 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/core/src/codecs/octetstream-codec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ export default class OctetstreamCodec implements ContentCodec {

case "null":
return null;
default:
throw new Error("Unable to handle object type " + dataType);
}
}

Expand Down Expand Up @@ -301,6 +303,8 @@ export default class OctetstreamCodec implements ContentCodec {

case "null":
return null;
default:
throw new Error("Unable to handle object type " + dataType);
}
}
}
2 changes: 1 addition & 1 deletion packages/core/src/content-serdes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export class ContentSerdes {
content.type = ContentSerdes.DEFAULT;
} else {
// empty payload without media type -> void/undefined (note: e.g., empty payload with text/plain -> "")
return;
return undefined;
}
}

Expand Down
2 changes: 2 additions & 0 deletions packages/core/src/servient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export default class Servient {
return vm.run(code, filename);
} catch (err) {
this.logScriptError(`Servient found error in privileged script '${filename}'`, err);
return undefined;
}
}

Expand Down Expand Up @@ -94,6 +95,7 @@ export default class Servient {
return vm.run(code, filename);
} catch (err) {
this.logScriptError(`Servient found error in privileged script '${filename}'`, err);
return undefined;
}
}

Expand Down