mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: More TypeScript strict fixes (#39300)
* Chore: More TypeScript strict fixes * Chore: Use filter instead of reduce to fix TypeScript error * Chore: Retype AzureResultFormat as string * Chore: Account for getBlocks() poor typings of reduce * Chore: Need to explicitly check for undefined here since '' is falsey
This commit is contained in:
@@ -267,7 +267,10 @@ export default class PromQlLanguageProvider extends LanguageProvider {
|
||||
|
||||
// Stitch all query lines together to support multi-line queries
|
||||
let queryOffset;
|
||||
const queryText = value.document.getBlocks().reduce((text: string, block) => {
|
||||
const queryText = value.document.getBlocks().reduce((text, block) => {
|
||||
if (text === undefined) {
|
||||
return '';
|
||||
}
|
||||
if (!block) {
|
||||
return text;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user