Skip to content

Commit

Permalink
Add patches/@redux-devtools+inspector-monitor-trace-tab+1.0.0.patch
Browse files Browse the repository at this point in the history
  • Loading branch information
jhen0409 committed Jul 23, 2023
1 parent 733004b commit 0004274
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions patches/@redux-devtools+inspector-monitor-trace-tab+1.0.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
diff --git a/node_modules/@redux-devtools/inspector-monitor-trace-tab/src/openFile.ts b/node_modules/@redux-devtools/inspector-monitor-trace-tab/src/openFile.ts
index d3cfdc9..9aeafeb 100644
--- a/node_modules/@redux-devtools/inspector-monitor-trace-tab/src/openFile.ts
+++ b/node_modules/@redux-devtools/inspector-monitor-trace-tab/src/openFile.ts
@@ -101,41 +101,5 @@ export default function openFile(
lineNumber: number,
stackFrame: StackFrame
) {
- if (!chrome || !chrome.storage) return; // TODO: Pass editor settings for using outside of browser extension
- const storage = isFF
- ? chrome.storage.local
- : chrome.storage.sync || chrome.storage.local;
- storage.get(
- ['useEditor', 'editor', 'projectPath'],
- function ({ useEditor, editor, projectPath }) {
- if (
- useEditor &&
- projectPath &&
- typeof editor === 'string' &&
- /^\w{1,30}$/.test(editor)
- ) {
- openInEditor(editor.toLowerCase(), projectPath as string, stackFrame);
- } else {
- if (
- chrome.devtools &&
- chrome.devtools.panels &&
- !!chrome.devtools.panels.openResource
- ) {
- openResource(fileName, lineNumber, stackFrame);
- } else if (chrome.runtime && (chrome.runtime.openOptionsPage || isFF)) {
- if (chrome.devtools && isFF) {
- chrome.devtools.inspectedWindow.eval(
- 'confirm("Set the editor to open the file in?")',
- (result) => {
- if (!result) return;
- void chrome.runtime.sendMessage({ type: 'OPEN_OPTIONS' });
- }
- );
- } else if (confirm('Set the editor to open the file in?')) {
- chrome.runtime.openOptionsPage();
- }
- }
- }
- }
- );
+ window.openInEditor && window.openInEditor(fileName, lineNumber)
}

0 comments on commit 0004274

Please sign in to comment.