Skip to content

Commit 8384af3

Browse files
committed
[refactor] 書き方をちょっと改善
1 parent 9880633 commit 8384af3

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/pages/index.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,9 @@ export default function Home(): JSX.Element {
6868
onClick={async () => {
6969
console.log(`clicked ${ex.title}`);
7070
const url = ex.url;
71-
if (is_offline && ex.dialog) {
72-
const dialog = ex.dialog;
73-
if (dialog) {
74-
alert(dialog);
75-
}
71+
const dialog = ex.dialog;
72+
if (is_offline && dialog) {
73+
alert(dialog);
7674
} else if (url) {
7775
window.open(url, "_blank").focus();
7876
// CORS の関係でエラーが出るが、特に問題ないので放置。

0 commit comments

Comments
 (0)