MasterRequest: Don't produce a DIAGNOSTICS return type with an empty diagnostics array
MODIFY
packages/@romejs/core/master/Master.ts
packages/@romejs/core/master/Master.ts
@@ -791,6 +791,14 @@ export default class Master {
message: err.message,
stack: err.stack,
};
+ } else if (diagnostics.length === 0) {
+ // Maybe DIAGNOSTICS and an empty array still makes sense instead of SUCCESS?
+ return {
+ type: 'SUCCESS',
+ hasData: false,
+ data: undefined,
+ markers,
+ };
} else {
return {
type: 'DIAGNOSTICS',

MasterRequest: Don't produce a DIAGNOSTICS return type with an empty diagnostics array