[PE mobile] Fix Bug 47072

This commit is contained in:
SergeyEzhin 2021-06-23 01:38:47 +03:00
parent 5229b93eeb
commit c5874e48ac
2 changed files with 5 additions and 5 deletions

View file

@ -134,11 +134,11 @@ class EditTextController extends Component {
let size = curSize;
if (isDecrement) {
typeof size === 'undefined' ? api.FontSizeOut() : size = Math.max(1, --size);
typeof size === 'undefined' || size == '' ? api.FontSizeOut() : size = Math.max(1, --size);
} else {
typeof size === 'undefined' ? api.FontSizeIn : size = Math.min(300, ++size);
typeof size === 'undefined' || size == '' ? api.FontSizeIn() : size = Math.min(300, ++size);
}
if (typeof size !== 'undefined') {
if (typeof size !== 'undefined' || size == '') {
api.put_TextPrFontSize(size);
}
};

View file

@ -15,7 +15,7 @@ const EditText = props => {
const fontName = storeTextSettings.fontName || _t.textFonts;
const fontSize = storeTextSettings.fontSize;
const fontColor = storeTextSettings.textColor;
const displaySize = typeof fontSize === 'undefined' ? _t.textAuto : fontSize + ' ' + _t.textPt;
const displaySize = typeof fontSize === 'undefined' || fontSize == '' ? _t.textAuto : fontSize + ' ' + _t.textPt;
const isBold = storeTextSettings.isBold;
const isItalic = storeTextSettings.isItalic;
const isUnderline = storeTextSettings.isUnderline;
@ -173,7 +173,7 @@ const PageFonts = props => {
const _t = t('View.Edit', {returnObjects: true});
const storeTextSettings = props.storeTextSettings;
const size = storeTextSettings.fontSize;
const displaySize = typeof size === 'undefined' ? _t.textAuto : size + ' ' + _t.textPt;
const displaySize = typeof size === 'undefined' || size == '' ? _t.textAuto : size + ' ' + _t.textPt;
const curFontName = storeTextSettings.fontName;
const fonts = storeTextSettings.fontsArray;