Skip to content

Commit 389823b

Browse files
authored
Do not ignore resolve callbacks
1 parent 0204c46 commit 389823b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/NovaEditorJsField.php

+4
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ public function resolveForDisplay($resource, $attribute = null)
5252

5353
$value = data_get($resource, str_replace('->', '.', $attribute), $placeholder = new \stdClass());
5454

55+
if (is_callable($this->resolveCallback)) {
56+
$value = call_user_func($this->resolveCallback, $value, $resource, $attribute);
57+
}
58+
5559
if (!$this->displayCallback) {
5660
$this->withMeta(['asHtml' => true]);
5761
$this->value = (string) NovaEditorJs::generateHtmlOutput($value);

0 commit comments

Comments
 (0)