Skip to content

Commit e2cc315

Browse files
authored
[DevTools] Don't suspend shell while retrieving original source for "open-in-editor" (#34381)
1 parent 5a31758 commit e2cc315

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

packages/react-devtools-shared/src/devtools/views/Components/OpenInEditorButton.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ type Props = {
2323
symbolicatedSourcePromise: Promise<SourceMappedLocation | null>,
2424
};
2525

26-
function OpenInEditorButton({
26+
function OpenSymbolicatedSourceInEditorButton({
2727
editorURL,
2828
source,
2929
symbolicatedSourcePromise,
@@ -45,4 +45,17 @@ function OpenInEditorButton({
4545
);
4646
}
4747

48+
function OpenInEditorButton(props: Props): React.Node {
49+
return (
50+
<React.Suspense
51+
fallback={
52+
<Button disabled={true} title="retrieving original source…">
53+
<ButtonIcon type="editor" />
54+
</Button>
55+
}>
56+
<OpenSymbolicatedSourceInEditorButton {...props} />
57+
</React.Suspense>
58+
);
59+
}
60+
4861
export default OpenInEditorButton;

0 commit comments

Comments
 (0)