aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/api/mergedapi.go
diff options
context:
space:
mode:
Diffstat (limited to 'rpc/api/mergedapi.go')
-rw-r--r--rpc/api/mergedapi.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/rpc/api/mergedapi.go b/rpc/api/mergedapi.go
index 8f4ef8e60..92e1e2bb7 100644
--- a/rpc/api/mergedapi.go
+++ b/rpc/api/mergedapi.go
@@ -39,9 +39,11 @@ func newMergedApi(apis ...shared.EthereumApi) *MergedApi {
mergedApi.methods = make(map[string]shared.EthereumApi)
for _, api := range apis {
- mergedApi.apis[api.Name()] = api.ApiVersion()
- for _, method := range api.Methods() {
- mergedApi.methods[method] = api
+ if api != nil {
+ mergedApi.apis[api.Name()] = api.ApiVersion()
+ for _, method := range api.Methods() {
+ mergedApi.methods[method] = api
+ }
}
}
return mergedApi