Bug fix to ApplyMethod treatment of method kwargs

This commit is contained in:
Grant Sanderson
2018-01-20 11:45:47 -08:00
parent 7c9f5ca711
commit 1ffbc77eda
3 changed files with 3 additions and 3 deletions

View File

@ -146,7 +146,7 @@ class ApplyMethod(Transform):
args = list(args) #So that args.pop() works
if "method_kwargs" in kwargs:
method_kwargs = kwargs["method_kwargs"]
elif isinstance(args[-1], dict):
elif len(args) > 0 and isinstance(args[-1], dict):
method_kwargs = args.pop()
else:
method_kwargs = {}