Skip to content

Commit

Permalink
show error message only if load error happens in main frame (#584)
Browse files Browse the repository at this point in the history
* show error message only if load error happens in main frame

* downgrade conda
  • Loading branch information
mbektas committed Feb 18, 2023
1 parent 285775a commit 3b938d2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/publish.yml
Expand Up @@ -24,6 +24,8 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: s-weigand/setup-conda@v1
# downgrade conda since v23.1.0 is causing issues in "Create Application Server Installer" step
- run: conda install -c conda-forge conda=22.11.1 -y

- name: Install node
uses: actions/setup-node@v3
Expand Down
12 changes: 10 additions & 2 deletions src/main/labview/labview.ts
Expand Up @@ -123,9 +123,17 @@ export class LabView implements IDisposable {

this._view.webContents.once(
'did-fail-load',
(event: Electron.Event, errorCode: number, errorDescription: string) => {
if (errorCallback) {
(
event: Electron.Event,
errorCode: number,
errorDescription: string,
validatedURL: string,
isMainFrame: boolean
) => {
if (isMainFrame && errorCallback) {
errorCallback(errorCode, errorDescription);
} else {
console.warn('Failed to load labview', errorDescription);
}
}
);
Expand Down

0 comments on commit 3b938d2

Please sign in to comment.