@ngx-formly/core 6.1.5 → 6.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -890,10 +890,10 @@ class FormlyField {
890
890
  if (!field) {
891
891
  return () => { };
892
892
  }
893
- const subscribes = [
894
- observeDeep(field, ['props'], () => field.options.detectChanges(field)),
895
- observeDeep(field, ['options', 'formState'], () => field.options.detectChanges(field)),
896
- ];
893
+ const subscribes = [observeDeep(field, ['props'], () => field.options.detectChanges(field))];
894
+ if (field.options) {
895
+ subscribes.push(observeDeep(field.options, ['formState'], () => field.options.detectChanges(field)));
896
+ }
897
897
  for (const key of Object.keys(field._expressions || {})) {
898
898
  const expressionObserver = observe(field, ['_expressions', key], ({ currentValue, previousValue }) => {
899
899
  if (previousValue?.subscription) {