Skip to content

Commit

Permalink
SK-1409 : Coverage fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
skyflow-shashank-prajapati committed Jan 22, 2024
1 parent e0d95ad commit c327d2a
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/core/internal/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export class FrameElement {
private domLabel?: HTMLLabelElement;

private domInput?: (HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement | HTMLFormElement)
& { iFrameFormElement : IFrameFormElement };
& { iFrameFormElement? : IFrameFormElement };

public domError?: HTMLSpanElement;

Expand Down Expand Up @@ -154,7 +154,7 @@ export class FrameElement {

this.domError = document.createElement('span');

let type;
let type:'select' | 'textarea' | 'input' = 'input';
if (this.iFrameFormElement?.fieldType === ELEMENTS.dropdown.name) {
type = 'select';
} else if (this.iFrameFormElement?.fieldType === ELEMENTS.textarea.name) {
Expand All @@ -168,9 +168,7 @@ export class FrameElement {

const inputElement = document.createElement(type);
this.domInput = inputElement;
if (this.domInput) {
this.domInput.iFrameFormElement = this.iFrameFormElement;
}
this.domInput.iFrameFormElement = this.iFrameFormElement;
inputElement.setAttribute(CUSTOM_ROW_ID_ATTRIBUTE, this.htmlDivElement?.id?.split(':')[0] || '');
this.inputParent.append(inputElement);

Expand Down

0 comments on commit c327d2a

Please sign in to comment.