From 2089b0a8df16a7319ebaebd22062e045989c36d4 Mon Sep 17 00:00:00 2001 From: Jeroen Veltmans Date: Tue, 17 Oct 2023 16:16:26 +0200 Subject: [PATCH] Install polyfill when upgrade is not a function --- packages/custom-elements/ts_src/custom-elements.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/custom-elements/ts_src/custom-elements.ts b/packages/custom-elements/ts_src/custom-elements.ts index dd019b311..7c42f7631 100644 --- a/packages/custom-elements/ts_src/custom-elements.ts +++ b/packages/custom-elements/ts_src/custom-elements.ts @@ -56,7 +56,8 @@ if ( !priorCustomElements || priorCustomElements['forcePolyfill'] || typeof priorCustomElements['define'] != 'function' || - typeof priorCustomElements['get'] != 'function' + typeof priorCustomElements['get'] != 'function' || + typeof priorCustomElements['upgrade'] != 'function' ) { installPolyfill(); }