Post #2512:  function
The issue is in mesh_clean.py. Find that line and replace it with this:
return context.active_object and context.active_object.mode in {'OBJECT', 'EDIT'}