insert new hooks at the start of their priority, to prevent duplicates on reload

This commit is contained in:
jesopo 2020-02-09 10:14:14 +00:00
parent 24cd513309
commit 94197b33a2

View file

@ -165,7 +165,7 @@ class EventRoot(object):
hook_array.insert(i, new_hook)
break
if not hooked:
hook_array.append(new_hook)
hook_array.insert(0, new_hook)
return new_hook
def _call(self, path: typing.List[str], kwargs: dict, safe: bool,