Skip to content

Commit 96e303f

Browse files
authored
Merge pull request #107 from leo108/patch-1
Should refresh the origin before checking changes
2 parents b0ccb57 + 52afe6d commit 96e303f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Traits/RunsClusterOperations.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,13 +195,13 @@ public function create(array $query = ['pretty' => 1])
195195
*/
196196
public function update(array $query = ['pretty' => 1]): bool
197197
{
198+
$this->refreshOriginal();
199+
198200
// If it didn't change, no way to trigger the change.
199201
if (! $this->hasChanged()) {
200202
return true;
201203
}
202204

203-
$this->refreshOriginal();
204-
205205
$instance = $this->cluster
206206
->setResourceClass(get_class($this))
207207
->runOperation(

0 commit comments

Comments
 (0)