Skip to content

Commit 120653d

Browse files
authored
fix/xss-issue
Fixes #150
1 parent 8b7fd58 commit 120653d

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/components/TreeNode/index.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,9 @@ export default defineComponent({
109109
return text;
110110
};
111111

112-
const customFormatter = (data: string) => {
113-
return props.customValueFormatter
114-
? props.customValueFormatter(data, props.node.key, props.node.path, defaultFormatter(data))
115-
: defaultFormatter(data);
116-
};
112+
const customFormatter = props.customValueFormatter
113+
? (data: string) => props.customValueFormatter(data, props.node.key, props.node.path, defaultFormatter(data))
114+
: null;
117115

118116
const onBracketsClickHandler = () => {
119117
if (props.collapsedOnClickBrackets) {

0 commit comments

Comments
 (0)