Skip to content

Commit

Permalink
Fix paste/clone issue with number field values not being retained
Browse files Browse the repository at this point in the history
  • Loading branch information
ttempleton committed Feb 6, 2019
1 parent 7c41d65 commit b589594
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/services/Blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ public function renderTabs(Block $block, bool $static = false, $namespace = null
$newNamespace = $namespace . '[__NEOBLOCK__][fields]';
$viewService->setNamespace($newNamespace);

$isNewBlock = $block->id === null;
// Ensure that this block is actually new, and not just a pasted or cloned block
// New blocks won't have their levels set at this stage, whereas they will be set for pasted/cloned blocks
$isNewBlock = $block->id === null && $block->level === null;

$tabsHtml = [];

Expand Down

0 comments on commit b589594

Please sign in to comment.