From 1ffb171cfb2b61fa9a7a6c75a75f9a442f2dd713 Mon Sep 17 00:00:00 2001 From: Peter Pisljar Date: Tue, 11 Feb 2020 09:30:43 -0500 Subject: [PATCH] don't register a wrapper if browser side function exists. (#57196) --- src/plugins/expressions/public/plugin.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/expressions/public/plugin.ts b/src/plugins/expressions/public/plugin.ts index 2ba10be76cd92..034be58ec9e35 100644 --- a/src/plugins/expressions/public/plugin.ts +++ b/src/plugins/expressions/public/plugin.ts @@ -163,6 +163,9 @@ export class ExpressionsPublicPlugin // function that matches its definition, but which simply // calls the server-side function endpoint. Object.keys(serverFunctionList).forEach(functionName => { + if (functions.get(functionName)) { + return; + } const fn = () => ({ ...serverFunctionList[functionName], fn: (context: any, args: any) => {