Skip to content

Commit 41d5c1a

Browse files
author
KPH
committed
fix:image.alt
1 parent 6d8cfad commit 41d5c1a

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

packages/hap-compiler/src/template/validator.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1864,12 +1864,7 @@ function checkAttr(name, value, output, tagName, locationInfo, options) {
18641864
* @returns {boolean}
18651865
*/
18661866
function shouldConvertPath(name, value, tagName) {
1867-
const skip = name === 'alt' && value === 'blank'
1868-
if (skip) {
1869-
return false
1870-
}
1871-
1872-
if (['src', 'alt'].includes(name) && value && ['img', 'video'].indexOf(tagName) > -1) {
1867+
if (['src'].includes(name) && value && ['img', 'video'].indexOf(tagName) > -1) {
18731868
if (!/^(data:|http|{{)/.test(value)) {
18741869
return true
18751870
}

0 commit comments

Comments
 (0)