Skip to content

Commit

Permalink
Fix spaces (#45105)
Browse files Browse the repository at this point in the history
* Fix spaces

* fix
  • Loading branch information
michaelnabil230 authored Nov 27, 2022
1 parent 3a2be91 commit 0ac9f0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Concerns/CompilesJsonPaths.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ protected function wrapJsonPath($value, $delimiter = '->')
$value = preg_replace("/([\\\\]+)?\\'/", "''", $value);

$jsonPath = collect(explode($delimiter, $value))
->map(fn ($segment) => $this->wrapJsonPathSegment($segment))
->map(fn ($segment) => $this->wrapJsonPathSegment($segment))
->join('.');

return "'$".(str_starts_with($jsonPath, '[') ? '' : '.').$jsonPath."'";
Expand Down

0 comments on commit 0ac9f0d

Please sign in to comment.