Skip to content

Commit 42fc2b9

Browse files
committed
fix: no go to ref
1 parent def4ad2 commit 42fc2b9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/shared/Property.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { isLocalRef } from '@stoplight/json';
12
import { JsonPath } from '@stoplight/types';
23
import { size as _size } from 'lodash-es';
34
import * as React from 'react';
@@ -48,7 +49,7 @@ export const Property: React.FunctionComponent<IProperty> = ({ node, path, onGoT
4849
{'$ref' in node ? `[${node.$ref}]` : null}
4950
</Types>
5051

51-
{'$ref' in node && !onGoToRef && !('children' in node) ? (
52+
{'$ref' in node && !onGoToRef && !isLocalRef(node.$ref) ? (
5253
<a role="button" className="text-blue-4 ml-2" onClick={handleGoToRef}>
5354
(go to ref)
5455
</a>

0 commit comments

Comments
 (0)