File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
packages/bootstrap-vue-3/src/directives Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ const resolveDelay = (values: DirectiveBinding['value']): Tooltip.Options['delay
65
65
return 0
66
66
}
67
67
68
- const resolveTitle = ( values : DirectiveBinding [ 'value' ] ) : Tooltip . Options [ 'title' ] =>
68
+ const resolveTitle = ( values : DirectiveBinding [ 'value' ] ) : Tooltip . Options [ 'title' ] | undefined =>
69
69
typeof values === 'object' ? values ?. title : values
70
70
71
71
/**
@@ -75,7 +75,7 @@ const BTooltip: Directive<HTMLElement> = {
75
75
beforeMount ( el , binding ) {
76
76
el . setAttribute ( 'data-bs-toggle' , 'tooltip' )
77
77
if ( ! el . getAttribute ( 'title' ) ) {
78
- el . setAttribute ( 'title' , resolveTitle ( binding . value ) . toString ( ) )
78
+ el . setAttribute ( 'title' , resolveTitle ( binding . value ) ? .toString ( ) )
79
79
}
80
80
81
81
const isHtml = / < ( " [ ^ " ] * " | ' [ ^ ' ] * ' | [ ^ ' " > ] ) * > / . test ( el . title )
@@ -97,7 +97,7 @@ const BTooltip: Directive<HTMLElement> = {
97
97
} ,
98
98
updated ( el , binding ) {
99
99
if ( ! el . getAttribute ( 'title' ) ) {
100
- el . setAttribute ( 'title' , resolveTitle ( binding . value ) . toString ( ) )
100
+ el . setAttribute ( 'title' , resolveTitle ( binding . value ) ? .toString ( ) )
101
101
}
102
102
103
103
const title = el . getAttribute ( 'title' )
You can’t perform that action at this time.
0 commit comments