Skip to content

Commit

Permalink
End tenancy before initializing again
Browse files Browse the repository at this point in the history
  • Loading branch information
stancl committed Jul 20, 2020
1 parent aee2a2e commit 9eb4bfb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Tenancy.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ public function initialize(Tenant $tenant): void
return;
}

if ($this->initialized) {
$this->end();
}

$this->tenant = $tenant;

event(new Events\InitializingTenancy($this));
Expand Down

0 comments on commit 9eb4bfb

Please sign in to comment.