Skip to content

Commit

Permalink
Fixes a crash when using Scout with Commerce #178
Browse files Browse the repository at this point in the history
  • Loading branch information
janhenckens committed Aug 13, 2021
1 parent 4fb83e4 commit cc87008
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Scout Changelog

All notable changes to this project will be documented in this file.
## 2.4.1 - Unreleased
## 2.4.1 - 2021-08-13

### Fixed
- CP Utility now works for indexes using the wildcard selector for siteId ([#163](https://github.com/studioespresso/craft-scout/issues/163))
- CP Utility labels are now translatable
- Fixed compatibility with Craft Commerce ([#178](https://github.com/studioespresso/craft-scout/issues/178))

## 2.3.1 - 2020-06-16

Expand Down
2 changes: 1 addition & 1 deletion src/ScoutIndex.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public static function create(string $indexName): self

public function elementType(string $class): self
{
if (!(new $class()) instanceof Element) {
if (!is_subclass_of($class, Element::class)) {
throw new Exception("Invalid Element Type {$class}");
}

Expand Down

0 comments on commit cc87008

Please sign in to comment.