@@ -23,7 +23,6 @@ const imgProps = omit(BImgProps, ['blank'])
23
23
export const props = makePropsConfigurable (
24
24
{
25
25
...imgProps ,
26
- blankColor : makeProp ( PROP_TYPE_STRING , 'transparent' ) ,
27
26
blankHeight : makeProp ( PROP_TYPE_NUMBER_STRING ) ,
28
27
// If `null`, a blank image is generated
29
28
blankSrc : makeProp ( PROP_TYPE_STRING , null ) ,
@@ -71,14 +70,14 @@ export const BImgLazy = /*#__PURE__*/ Vue.extend({
71
70
. filter ( identity )
72
71
. join ( ',' )
73
72
74
- return ! this . blankSrc || this . isShown ? srcset : null
73
+ return srcset && ( ! this . blankSrc || this . isShown ) ? srcset : null
75
74
} ,
76
75
computedSizes ( ) {
77
76
const sizes = concat ( this . sizes )
78
77
. filter ( identity )
79
78
. join ( ',' )
80
79
81
- return ! this . blankSrc || this . isShown ? sizes : null
80
+ return sizes && ( ! this . blankSrc || this . isShown ) ? sizes : null
82
81
}
83
82
} ,
84
83
watch : {
@@ -90,7 +89,7 @@ export const BImgLazy = /*#__PURE__*/ Vue.extend({
90
89
this . isShown = visible
91
90
92
91
// Ensure the show prop is synced (when no `IntersectionObserver`)
93
- if ( visible !== newValue ) {
92
+ if ( newValue !== visible ) {
94
93
this . $nextTick ( this . updateShowProp )
95
94
}
96
95
}
@@ -124,7 +123,7 @@ export const BImgLazy = /*#__PURE__*/ Vue.extend({
124
123
// We only add the visible directive if we are not shown
125
124
directives . push ( {
126
125
// Visible directive will silently do nothing if
127
- // IntersectionObserver is not supported
126
+ // ` IntersectionObserver` is not supported
128
127
name : 'b-visible' ,
129
128
// Value expects a callback (passed one arg of `visible` = `true` or `false`)
130
129
value : this . doShow ,
@@ -147,8 +146,8 @@ export const BImgLazy = /*#__PURE__*/ Vue.extend({
147
146
blank : this . computedBlank ,
148
147
width : this . computedWidth ,
149
148
height : this . computedHeight ,
150
- srcset : this . computedSrcset || null ,
151
- sizes : this . computedSizes || null
149
+ srcset : this . computedSrcset ,
150
+ sizes : this . computedSizes
152
151
}
153
152
} )
154
153
}
0 commit comments