Skip to content

Commit

Permalink
fix: cascader dynamic empty options (#1501)
Browse files Browse the repository at this point in the history
  • Loading branch information
PengYYYYY authored Sep 19, 2022
1 parent 0fd18b9 commit 39dfbe9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cascader/hooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ export const useCascaderContext = (props: TdCascaderProps) => {

const { disabled, options = [], keys = {}, checkStrictly = false, lazy = true, load, valueMode = 'onlyLeaf' } = props;
useEffect(() => {
if (!options.length) return;
if (!treeStore) {
if (!options.length) return;
const store = new TreeStore({
keys: {
...keys,
Expand Down

0 comments on commit 39dfbe9

Please sign in to comment.