From c9490647a2864b88ac9e213f649e6c2a460d8106 Mon Sep 17 00:00:00 2001 From: EnixCoda Date: Sat, 23 Feb 2019 20:13:05 +0800 Subject: [PATCH] fix: if going to throw error, construct a new one --- src/driver/connect.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/driver/connect.ts b/src/driver/connect.ts index 193f215..45efd25 100644 --- a/src/driver/connect.ts +++ b/src/driver/connect.ts @@ -74,7 +74,7 @@ function link(instance: React.Component, sources: Sources): 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) }