diff --git a/packages/sdks/web-component/src/lib/helpers/templates.ts b/packages/sdks/web-component/src/lib/helpers/templates.ts index a64b78c4c..39d8ba8cb 100644 --- a/packages/sdks/web-component/src/lib/helpers/templates.ts +++ b/packages/sdks/web-component/src/lib/helpers/templates.ts @@ -302,11 +302,11 @@ export const setPhoneAutoDetectDefaultCode = ( fragment: DocumentFragment, autoDetectCode?: string, ) => { - Array.from( - fragment.querySelectorAll('descope-phone-field[default-code="autoDetect"]'), - ).forEach((phoneEle) => { - phoneEle.setAttribute('default-code', autoDetectCode); - }); + Array.from(fragment.querySelectorAll('[default-code="autoDetect"]')).forEach( + (phoneEle) => { + phoneEle.setAttribute('default-code', autoDetectCode); + }, + ); }; export const disableWebauthnButtons = (fragment: DocumentFragment) => {