Skip to content

Commit 508c749

Browse files
committed
updated: reset method
1 parent 55b2d07 commit 508c749

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/QueryEngine.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,9 @@ public function exists()
308308
*/
309309
public function reset($data = null, $fresh = false)
310310
{
311+
if (is_null($data)) {
312+
$data = $this->_baseContents;
313+
}
311314

312315
if ($fresh) {
313316
$self = new static();
@@ -316,9 +319,7 @@ public function reset($data = null, $fresh = false)
316319
return $self;
317320
}
318321

319-
if (!is_null($data)) {
320-
$this->collect($data);
321-
}
322+
$this->collect($data);
322323

323324
$this->reProcess();
324325

0 commit comments

Comments
 (0)