-
-
Notifications
You must be signed in to change notification settings - Fork 810
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add patches/@redux-devtools+inspector-monitor-trace-tab+1.0.0.patch
- Loading branch information
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
47 changes: 47 additions & 0 deletions
47
patches/@redux-devtools+inspector-monitor-trace-tab+1.0.0.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
} |