Skip to content

Commit

Permalink
Used instance of instead of equals to determine if an object should b…
Browse files Browse the repository at this point in the history
…e handled.

Signed-off-by: Peter Ukena <[email protected]>
  • Loading branch information
peterukena authored and damonsson committed Oct 1, 2019
1 parent f340c67 commit cc4e788
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/EventListener/ResourceIndexListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function updateIndex(GenericEvent $event): void
Assert::isInstanceOf($resource, ResourceInterface::class);

foreach ($this->persistersMap as $objectPersisterId => $modelClass) {
if ($modelClass === get_class($resource)) {
if ($resource instanceof $modelClass) {
$this->resourceRefresher->refresh($resource, $objectPersisterId);
}
}
Expand Down

0 comments on commit cc4e788

Please sign in to comment.