Skip to content

Commit

Permalink
🛠 Refactor: Fix ModalView Lint Errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dominicstop committed Jan 9, 2023
1 parent 0f33fcd commit e0823df
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/components/ModalView/ModalView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,10 @@ export class ModalView extends
setVisibility = async (nextVisible, childProps = null) => {
const { visible: prevVisible } = this.state;

const didChange = prevVisible != nextVisible;
const didChange = (prevVisible !== nextVisible);

if (!didChange) {
return false;
return;
}

if (nextVisible) {
Expand Down Expand Up @@ -217,6 +217,7 @@ export class ModalView extends
} catch (error) {
console.log('ModalView, setVisibility failed:');
console.log(error);
throw error;
}
};

Expand All @@ -229,19 +230,20 @@ export class ModalView extends
} catch (error) {
console.log('ModalView, requestModalInfo failed:');
console.log(error);
throw error;
}
};

setEnableSwipeGesture = async (enableSwipeGesture) => {
const { enableSwipeGesture: prevVal } = this.state;
if (prevVal != enableSwipeGesture) {
if (prevVal !== enableSwipeGesture) {
await Helpers.setStateAsync(this, { enableSwipeGesture });
}
};

setIsModalInPresentation = async (isModalInPresentation) => {
const { isModalInPresentation: prevVal } = this.state;
if (prevVal != isModalInPresentation) {
if (prevVal !== isModalInPresentation) {
await Helpers.setStateAsync(this, { isModalInPresentation });
}
};
Expand Down

0 comments on commit e0823df

Please sign in to comment.