minishouyin/node_modules/antd/lib/_util/toList.js

13 lines
350 B
JavaScript
Raw Permalink Normal View History

2025-11-12 11:35:57 +08:00
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
const toList = (candidate, skipEmpty = false) => {
if (skipEmpty && (candidate === undefined || candidate === null)) {
return [];
}
return Array.isArray(candidate) ? candidate : [candidate];
};
var _default = exports.default = toList;