Skip to content

Commit 189d965

Browse files
Add new keywords for Dart 1 compatibility
1 parent a3810da commit 189d965

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/src/component_declaration/component_base.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ abstract class UiComponent<TProps extends UiProps> extends react.Component imple
248248
var unwrappedProps = this.unwrappedProps;
249249
var typedProps = _typedPropsCache[unwrappedProps];
250250
if (typedProps == null) {
251-
typedProps = typedPropsFactory(inReactDevMode ? _WarnOnModify(unwrappedProps, true) : unwrappedProps);
251+
typedProps = typedPropsFactory(inReactDevMode ? new _WarnOnModify(unwrappedProps, true) : unwrappedProps);
252252
_typedPropsCache[unwrappedProps] = typedProps;
253253
}
254254
return typedProps;
@@ -418,7 +418,7 @@ abstract class UiStatefulComponent<TProps extends UiProps, TState extends UiStat
418418
var unwrappedState = this.unwrappedState;
419419
var typedState = _typedStateCache[unwrappedState];
420420
if (typedState == null) {
421-
typedState = typedStateFactory(inReactDevMode ? _WarnOnModify(unwrappedState, false) : unwrappedState);
421+
typedState = typedStateFactory(inReactDevMode ? new _WarnOnModify(unwrappedState, false) : unwrappedState);
422422
_typedStateCache[unwrappedState] = typedState;
423423
}
424424
return typedState;

0 commit comments

Comments
 (0)