Skip to content

Commit 8c2674e

Browse files
linjiajian999yyx990803
authored andcommitted
refactor: remove unnecessary judgment (#8493)
1 parent eb60452 commit 8c2674e

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

Diff for: src/compiler/parser/html-parser.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -248,12 +248,9 @@ export function parseHTML (html, options) {
248248
if (start == null) start = index
249249
if (end == null) end = index
250250

251-
if (tagName) {
252-
lowerCasedTagName = tagName.toLowerCase()
253-
}
254-
255251
// Find the closest opened tag of the same type
256252
if (tagName) {
253+
lowerCasedTagName = tagName.toLowerCase()
257254
for (pos = stack.length - 1; pos >= 0; pos--) {
258255
if (stack[pos].lowerCasedTag === lowerCasedTagName) {
259256
break

0 commit comments

Comments
 (0)