Skip to content

Commit 2357539

Browse files
authored
fix: handle optional chaining for allowed_vfolder_hosts in resource policy (#4410)
1 parent 807fab7 commit 2357539

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

react/src/components/VFolderNodeIdenticon.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,16 @@ const VFolderNodeIdenticon: React.FC<VFolderNodeIdenticonProps> = ({
2626

2727
return (
2828
<img
29+
draggable={false}
30+
onDragStart={(e) => e.preventDefault()}
2931
style={{
3032
borderRadius: '0.25em',
3133
width: '1em',
3234
height: '1em',
3335
borderWidth: 0.5,
3436
borderStyle: 'solid',
3537
borderColor: token.colorBorder,
38+
userSelect: 'none',
3639
...style,
3740
}}
3841
src={createAvatar(shapes, {

src/components/backend-ai-folder-explorer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ export default class BackendAIFolderExplorer extends BackendAIPage {
752752
mergedData?.group?.allowed_vfolder_hosts || '{}',
753753
);
754754
const allowedPermissionForResourcePolicyByVolume = JSON.parse(
755-
mergedData?.keypair_resource_policy.allowed_vfolder_hosts || '{}',
755+
mergedData?.keypair_resource_policy?.allowed_vfolder_hosts || '{}',
756756
);
757757

758758
const _mergeDedupe = (arr) => [...new Set([].concat(...arr))];

0 commit comments

Comments
 (0)