[PE mobile] Fix bug 42820

This commit is contained in:
Julia Svinareva 2020-01-23 10:14:27 +03:00 committed by Alexey Golubev
parent 596683d63e
commit 1f2b093ed1

View file

@ -316,10 +316,13 @@ define([
// API handlers
onApiPageSize: function(width, height) {
for (var i = 0; i < _slideSizeArr.length; i++) {
if (Math.abs(_slideSizeArr[i][0] - width) < 0.001 && Math.abs(_slideSizeArr[i][1] - height) < 0.001) {
$('#page-settings-setup-view input').val([i]);
break;
var $input = $('#page-settings-view input[name="slide-size"]');
if ($input.length > 0) {
for (var i = 0; i < _slideSizeArr.length; i++) {
if (Math.abs(_slideSizeArr[i][0] - width) < 0.001 && Math.abs(_slideSizeArr[i][1] - height) < 0.001) {
$input.val([i]);
break;
}
}
}
},