Skip to content

Commit fbd8c6d

Browse files
ceynriphanan
authored andcommitted
Add braces to make code more clear (vuejs#2390)
According to the general coding standards, if statements are best to add curly braces to avoid misunderstanding, and it can make code more clear.
1 parent 2d8050e commit fbd8c6d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/v2/guide/events.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,9 @@ Sometimes we also need to access the original DOM event in an inline statement h
156156
methods: {
157157
warn: function (message, event) {
158158
// now we have access to the native event
159-
if (event) event.preventDefault()
159+
if (event) {
160+
event.preventDefault()
161+
}
160162
alert(message)
161163
}
162164
}

0 commit comments

Comments
 (0)