Fixes closeOnExternalClick if statement so that it checks there's a trig...

...ger before checking if the trigger contains the event target

Closes #23