Skip to content
This repository was archived by the owner on Apr 20, 2022. It is now read-only.

Commit b12209a

Browse files
committed
fix logic bug
1 parent a7259db commit b12209a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/HasSettings.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public static function bootHasSettings()
1818
});
1919

2020
self::saving(function ($model) {
21-
if (property_exists($model, 'allowedSettings') && is_array($model->allowedSettings)) {
21+
if ($model->settings && property_exists($model, 'allowedSettings') && is_array($model->allowedSettings)) {
2222
$model->settings = array_only($model->settings, $model->allowedSettings);
2323
}
2424
});

0 commit comments

Comments
 (0)