Move setting plugin helpers to a seperate function to avoid breaking changes. (#10809)

This commit is contained in:
Christopher Speller
2019-05-08 11:54:52 -07:00
committed by Harrison Healey
parent 6ce3cc6921
commit 66cb36f5dc
3 changed files with 15 additions and 6 deletions

View File

@@ -196,9 +196,11 @@ func (s *hooksRPCServer) OnActivate(args *Z_OnActivateArgs, returns *Z_OnActivat
}
if mmplugin, ok := s.impl.(interface {
SetAPI(api API, helpers Helpers)
SetAPI(api API)
SetHelpers(helpers Helpers)
}); ok {
mmplugin.SetAPI(s.apiRPCClient, &HelpersImpl{API: s.apiRPCClient})
mmplugin.SetAPI(s.apiRPCClient)
mmplugin.SetHelpers(&HelpersImpl{API: s.apiRPCClient})
}
if mmplugin, ok := s.impl.(interface {