Skip to content

Commit

Permalink
Fix staticField error
Browse files Browse the repository at this point in the history
  • Loading branch information
engram-design committed Nov 10, 2018
1 parent d2bc675 commit e962654
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/fields/SuperTableField.php
Original file line number Diff line number Diff line change
Expand Up @@ -399,11 +399,6 @@ public function normalizeValue($value, ElementInterface $element = null)
$query->setCachedResult($this->_createBlocksFromSerializedData($value, $element));
}

// TODO: Properly fix this by diving into query...
// if ($this->staticField && !Craft::$app->getRequest()->getIsCpRequest() && !Craft::$app->getRequest()->getIsConsoleRequest()) {
// return $query->one();
// }

return $query;
}

Expand Down Expand Up @@ -636,6 +631,7 @@ public function getStaticHtml($value, ElementInterface $element): string
'blocks' => $value,
'static' => true,
'staticBlocks' => true,
'staticField' => $this->staticField,
'supertableField' => $this,
]);
}
Expand Down

0 comments on commit e962654

Please sign in to comment.