mirror of
https://github.com/EnixCoda/Gitako.git
synced 2026-03-11 08:54:44 +00:00
fix: if going to throw error, construct a new one
This commit is contained in:
parent
eed111e2aa
commit
c9490647a2
1 changed files with 1 additions and 1 deletions
|
|
@ -74,7 +74,7 @@ function link<P, S>(instance: React.Component<P, S>, sources: Sources<P, S>): Wr
|
|||
const isFromSource = sourcesValues.includes(createMethod)
|
||||
if (isFromSource) {
|
||||
const method = map.get(createMethod)
|
||||
if (!method) throw Error('Method not found')
|
||||
if (!method) throw new Error('Method not found')
|
||||
const runnable = applyMiddlewares(method, otherArgs)
|
||||
run(runnable)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue