Skip to content

Commit 753ed09

Browse files
committed
fix console warning about unsupported data format
before this change you could see the following warning and error on the browser console: Can not convert Object { } runRequest.catchError Error: Unsupported data format when changing from "predefined graph" to "single metric" with an already selected predefined graph.
1 parent 2e42fa1 commit 753ed09

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/backend/rest.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,10 @@ export default class RestApiBackend implements Backend {
362362
// this will result in a grafana note that suggests the graph should be
363363
// changed to a table. By returning an empty MutableDataFrame grafana
364364
// shows "no data" as expected.
365-
return toDataFrame({});
365+
return toDataFrame({
366+
refId: query.refId,
367+
fields: [],
368+
});
366369
}
367370
}
368371

0 commit comments

Comments
 (0)