Skip to content

Commit

Permalink
[skip ci] Thrown error objects in typescript are unknowns generally i…
Browse files Browse the repository at this point in the history
…nstead of Error
  • Loading branch information
cmdcolin committed Oct 3, 2023
1 parent 87daee3 commit 2bf3797
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
Expand Up @@ -57,9 +57,7 @@ const ShareBookmarksDialog = observer(function ({
}
setLoading(true)
const snap = getSnapshot(bookmarksToShare)

const locationUrl = new URL(window.location.href)

const result = await shareSessionToDynamo(
snap,
session.shareURL,
Expand All @@ -75,7 +73,6 @@ const ShareBookmarksDialog = observer(function ({
}
} catch (e) {
setError(e)
session.notify(`${e}`, 'error')
} finally {
setLoading(false)
}
Expand Down
4 changes: 2 additions & 2 deletions plugins/linear-genome-view/src/LinearGenomeView/model.ts
Expand Up @@ -242,7 +242,7 @@ export function stateModelFactory(pluginManager: PluginManager) {
volatileWidth: undefined as number | undefined,
minimumBlockWidth: 3,
draggingTrackId: undefined as undefined | string,
volatileError: undefined as undefined | Error,
volatileError: undefined as unknown,

// array of callbacks to run after the next set of the displayedRegions,
// which is basically like an onLoad
Expand Down Expand Up @@ -535,7 +535,7 @@ export function stateModelFactory(pluginManager: PluginManager) {
/**
* #action
*/
setError(error: Error | undefined) {
setError(error: unknown) {
self.volatileError = error
},
/**
Expand Down
Expand Up @@ -59,7 +59,7 @@ export default function createModel(
),
})
.volatile(() => ({
error: undefined as Error | undefined,
error: undefined as unknown,
adminMode: false,
version,
}))
Expand All @@ -83,8 +83,8 @@ export default function createModel(
/**
* #action
*/
setError(errorMessage: Error | undefined) {
self.error = errorMessage
setError(error: unknown) {
self.error = error
},
/**
* #action
Expand Down
Expand Up @@ -93,8 +93,8 @@ export default function createModel(
/**
* #action
*/
setError(errorMessage: Error | undefined) {
self.error = errorMessage
setError(error: unknown) {
self.error = error
},
/**
* #action
Expand Down

0 comments on commit 2bf3797

Please sign in to comment.