Fixed #2903 - Tooltip: add type/empty check for its value
parent
a0f9d344a8
commit
5761c63410
|
@ -1,4 +1,4 @@
|
|||
import {UniqueComponentId,DomHandler,ConnectedOverlayScrollHandler,ZIndexUtils} from 'primevue/utils';
|
||||
import {UniqueComponentId,DomHandler,ObjectUtils,ConnectedOverlayScrollHandler,ZIndexUtils} from 'primevue/utils';
|
||||
|
||||
function bindEvents(el) {
|
||||
const modifiers = el.$_ptooltipModifiers;
|
||||
|
@ -300,7 +300,7 @@ const Tooltip = {
|
|||
target.$_ptooltipFitContent = true;
|
||||
}
|
||||
else if (typeof options.value === 'object' && options.value) {
|
||||
if (options.value.value === undefined || options.value.value === null || options.value.value.trim() === '') return;
|
||||
if (ObjectUtils.isEmpty(options.value.value)) return;
|
||||
else {
|
||||
/* eslint-disable */
|
||||
target.$_ptooltipValue = options.value.value;
|
||||
|
@ -338,7 +338,7 @@ const Tooltip = {
|
|||
target.$_ptooltipClass = null;
|
||||
}
|
||||
else if (typeof options.value === 'object' && options.value) {
|
||||
if (options.value.value === undefined || options.value.value === null || options.value.value.trim() === '') return;
|
||||
if (ObjectUtils.isEmpty(options.value.value)) return;
|
||||
else {
|
||||
/* eslint-disable */
|
||||
target.$_ptooltipValue = options.value.value;
|
||||
|
|
Loading…
Reference in New Issue