Skip to content

Commit 2617514

Browse files
authored
fix: replace some DOM Element method not supported in Salesforce (#84)
* fix: replace some DOM Element method not supported in Salesforce some methods aren't supported in Salesforce for unknown reasons and it throws some errors like "append function does not exist"
1 parent 3fe474a commit 2617514

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/src/MultipleSelectInstance.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@ export class MultipleSelectInstance {
7979
if (hardDestroy) {
8080
this.options.onHardDestroy();
8181
}
82-
this.elm.before(this.parentElm);
82+
if (this.elm.parentElement && this.parentElm.parentElement) {
83+
this.elm.parentElement.insertBefore(this.elm, this.parentElm.parentElement!.firstChild);
84+
}
8385
this.elm.classList.remove('ms-offscreen');
8486
this._bindEventService.unbindAll();
8587

0 commit comments

Comments
 (0)