Skip to content

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
weaverryan committed Feb 29, 2024
1 parent bf6510f commit da9f764
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/LiveComponent/assets/dist/live_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -1374,9 +1374,9 @@ function executeMorphdom(rootFromElement, rootToElement, modifiedFieldElements,
if (modifiedFieldElements.includes(fromEl)) {
setValueOnElement(toEl, getElementValue(fromEl));
}
if (fromEl === document.activeElement
&& fromEl !== document.body
&& null !== getModelDirectiveFromElement(fromEl, false)) {
if (fromEl === document.activeElement &&
fromEl !== document.body &&
null !== getModelDirectiveFromElement(fromEl, false)) {
setValueOnElement(toEl, getElementValue(fromEl));
}
const elementChanges = externalMutationTracker.getChangedElement(fromEl);
Expand Down
7 changes: 4 additions & 3 deletions src/LiveComponent/assets/src/morphdom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,10 @@ export function executeMorphdom(
// We skip this for non-model elements and allow this to either
// maintain the value if changed (see code above) or for the
// morphing process to update it to the value from the server.
if (fromEl === document.activeElement
&& fromEl !== document.body
&& null !== getModelDirectiveFromElement(fromEl, false)
if (
fromEl === document.activeElement &&
fromEl !== document.body &&
null !== getModelDirectiveFromElement(fromEl, false)
) {
setValueOnElement(toEl, getElementValue(fromEl));
}
Expand Down

0 comments on commit da9f764

Please sign in to comment.