Fixed #4150 - Improve pt syntax for 'class' definitions

pull/4153/head
mertsincan 2023-07-17 13:31:09 +01:00
parent cbad15003f
commit 68c5d088eb
2 changed files with 2 additions and 2 deletions

View File

@ -437,7 +437,7 @@ export default {
const getValue = (...args) => {
const value = this._getOptionValue(...args);
return ObjectUtils.isString(value) ? { class: value } : value;
return ObjectUtils.isString(value) || ObjectUtils.isArray(value) ? { class: value } : value;
};
const datasetPrefix = 'data-pc-';

View File

@ -18,7 +18,7 @@ const BaseDirective = {
const getValue = (...args) => {
const value = BaseDirective._getOptionValue(...args);
return ObjectUtils.isString(value) ? { class: value } : value;
return ObjectUtils.isString(value) || ObjectUtils.isArray(value) ? { class: value } : value;
};
const datasetPrefix = 'data-pc-';