From 5908bc1d3cd4c649651362bef0db4b1e9afe3b43 Mon Sep 17 00:00:00 2001 From: Alec Ritson Date: Wed, 21 Feb 2024 09:58:49 +0000 Subject: [PATCH] Patch product indexer for typescript --- packages/core/src/Search/ProductIndexer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/src/Search/ProductIndexer.php b/packages/core/src/Search/ProductIndexer.php index 6d94df3f14..1ae577b5e3 100644 --- a/packages/core/src/Search/ProductIndexer.php +++ b/packages/core/src/Search/ProductIndexer.php @@ -41,11 +41,11 @@ public function toSearchableArray(Model $model): array // Do this here so other additions to the data appear under the attributes, // more of a vanity thing than anything else. $data = array_merge([ - 'id' => $model->id, + 'id' => (string) $model->id, 'status' => $model->status, 'product_type' => $model->productType->name, 'brand' => $model->brand?->name, - 'created_at' => $model->created_at->timestamp, + 'created_at' => (int) $model->created_at->timestamp, ], $this->mapSearchableAttributes($model)); if ($thumbnail = $model->thumbnail) {