Skip to content

Commit 12756b7

Browse files
Cliffbackcalebdwilliams
authored andcommitted
fix: add explicit return type
1 parent 03d0938 commit 12756b7

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/utils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -345,9 +345,9 @@ export const overrideFormMethod = (
345345
* either constructed or appended from a DocumentFragment
346346
* @param ref {HTMLElement} - The custom element to upgrade
347347
*/
348-
export const upgradeInternals = (ref: FormAssociatedCustomElement) => {
348+
export const upgradeInternals = (ref: FormAssociatedCustomElement): boolean => {
349+
let attached = false;
349350
if (ref.constructor["formAssociated"]) {
350-
let attached = false;
351351
let internals = internalsMap.get(ref);
352352
// we might have cases where the internals are not set
353353
if (internals === undefined) {
@@ -358,8 +358,8 @@ export const upgradeInternals = (ref: FormAssociatedCustomElement) => {
358358
const { labels, form } = internals;
359359
initLabels(ref, labels);
360360
initForm(ref, form, internals);
361-
return attached;
362361
}
362+
return attached;
363363
};
364364

365365
/**

0 commit comments

Comments
 (0)