File tree Expand file tree Collapse file tree
Renderer/src/renderers/native Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1747,12 +1747,6 @@ function createAnimatedComponent(Component: any): any {
17471747 var callback = () => {
17481748 if (this._component.setNativeProps) {
17491749 if (!this._propsAnimated.__isNative) {
1750- if (this._component.viewConfig == null) {
1751- var ctor = this._component.constructor;
1752- var componentName = ctor.displayName || ctor.name || '<Unknown Component>';
1753- throw new Error(componentName + ' "viewConfig" is not defined.');
1754- }
1755-
17561750 this._component.setNativeProps(
17571751 this._propsAnimated.__getAnimatedValue()
17581752 );
Original file line number Diff line number Diff line change @@ -139,6 +139,12 @@ var NativeMethodsMixin = {
139139 * Manipulation](docs/direct-manipulation.html)).
140140 */
141141 setNativeProps : function ( nativeProps : Object ) {
142+ if ( ! this . viewConfig ) {
143+ var ctor = this . constructor ;
144+ var componentName = ctor . displayName || ctor . name || '<Unknown Component>' ;
145+ throw new Error ( componentName + ' "viewConfig" is not defined.' ) ;
146+ }
147+
142148 if ( __DEV__ ) {
143149 warnForStyleProps( nativeProps , this . viewConfig . validAttributes) ;
144150 }
You can’t perform that action at this time.
0 commit comments