diff --git a/src/Space.php b/src/Space.php index d55c501..28e76d4 100644 --- a/src/Space.php +++ b/src/Space.php @@ -460,10 +460,10 @@ public function update($instance, Operations|array $operations) $data = $operations; $operations = null; foreach ($data as $k => $v) { - if ($operations == null) { - $operations = Operations::set($k, $v); - } else { + if ($operations !== null) { $operations = $operations->andSet($k, $v); + } else { + $operations = Operations::set($k, $v); } } }