fix: Fixes recording dialog web rendering.

[features/base/app] <APP.componentDidCatch>:  TypeError: Failed to set an indexed property on 'CSSStyleDeclaration': Indexed property setter is not supported.
This commit is contained in:
Дамян Минков 2022-03-02 12:47:38 -06:00
parent 0936a64d3f
commit 5d41da9358
1 changed files with 9 additions and 1 deletions

View File

@ -1,5 +1,7 @@
import React, { Component } from 'react';
import { getFixedPlatformStyle } from '../../../styles';
/**
* Implements a React/Web {@link Component} for displaying text similar to React
* Native's {@code Text} in order to facilitate cross-platform source code.
@ -14,6 +16,12 @@ export default class Text extends Component {
* @returns {ReactElement}
*/
render() {
return React.createElement('span', this.props);
// eslint-disable-next-line react/prop-types
const _style = getFixedPlatformStyle(this.props.style);
return React.createElement('span', {
...this.props,
style: _style
});
}
}