Skip to content

Commit aa5129b

Browse files
committed
Fix saved queries for 3rd-party plugins by honoring wildcard supportedAppName (fixes #10972)
Signed-off-by: Thilo-Alexander Ginkel <[email protected]>
1 parent 1d6b317 commit aa5129b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/plugins/data/public/query/saved_query/saved_query_service.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,8 @@ export const createSavedQueryService = (
149149
) {
150150
queries = queries.filter((query) => {
151151
const languageId = query.attributes.query.language;
152-
return (
153-
languageService?.getLanguage(languageId)?.supportedAppNames?.includes(currentAppId) ??
154-
true
155-
);
152+
const supportedAppNames = languageService?.getLanguage(languageId)?.supportedAppNames;
153+
return ['*', currentAppId].some((app) => supportedAppNames?.includes(app)) ?? true;
156154
});
157155
}
158156

0 commit comments

Comments
 (0)