Skip to content

Commit

Permalink
fix(adding): Fix adding element not working with built-in button
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco (Valandur) committed Aug 13, 2018
1 parent 9d68331 commit cf054e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/TreeView.php
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ public function add($request)
$child = $type::create();
$child->Name = "New " . $child->singular_name();

$sort = intval($data["sort"]);
$sort = isset($data["sort"]) ? intval($data["sort"]) : 0;
$sortBy = $this->getSortField();
$sortArr = [$sortBy => $sort];

Expand Down

0 comments on commit cf054e3

Please sign in to comment.