tv形态设备出现jscrash

Signed-off-by: yuwenzheng <yuwenzheng3@h-partners.com>
This commit is contained in:
yuwenzheng 2024-07-29 15:56:07 +08:00
parent fd3dae4508
commit 90eaf9727c
2 changed files with 7 additions and 7 deletions

View File

@ -276,7 +276,7 @@ export class LayoutViewModel {
let folderGutter = this.mLauncherLayoutStyleConfig.mFolderGutterRatio * folderSize;
let folderMargin = this.mLauncherLayoutStyleConfig.mFolderMarginRatio * folderSize;
let column = layoutInfo.column;
let column = layoutInfo?.column;
let iconSize = (folderSize - folderGutter * 2 - folderMargin * 2) / column;
let nameHeight = this.mDesktopNameHeight;
let nameLines = this.mDesktopNameLines;
@ -302,8 +302,8 @@ export class LayoutViewModel {
*/
calculateOpenFolder(openFolderConfig: any): any {
Log.showInfo(TAG, 'calculateOpenFolder start');
let row = openFolderConfig.row;
let column = openFolderConfig.column;
let row = openFolderConfig?.row;
let column = openFolderConfig?.column;
let gutter = this.mLauncherLayoutStyleConfig.mFolderOpenGutter;
let padding = this.mLauncherLayoutStyleConfig.mFolderOpenPADDING;
let margin = this.mLauncherLayoutStyleConfig.mFolderOpenMargin;
@ -339,7 +339,7 @@ export class LayoutViewModel {
*/
calculateFolderAddList(addFolderConfig: any): any {
Log.showInfo(TAG, 'calculateFolderAddList start');
let column: number = addFolderConfig.column;
let column: number = addFolderConfig?.column;
let margin: number = this.mLauncherLayoutStyleConfig.mFolderAddGridMargin;
let saveMargin: number = PresetStyleConstants.DEFAULT_SCREEN_GRID_GAP_AND_MARGIN;
let screenGap: number = PresetStyleConstants.DEFAULT_SCREEN_GRID_GAP_AND_MARGIN;

View File

@ -49,15 +49,15 @@ export class BigFolderModel {
}
getFolderLayout(): any {
return this.mFolderLayoutConfig.getFolderLayoutInfo().folderLayoutTable;
return this.mFolderLayoutConfig.getFolderLayoutInfo()?.folderLayoutTable;
}
getFolderOpenLayout(): any {
return this.mFolderLayoutConfig.getFolderLayoutInfo().folderOpenLayoutTable;
return this.mFolderLayoutConfig.getFolderLayoutInfo()?.folderOpenLayoutTable;
}
getFolderAddAppLayout(): any {
return this.mFolderLayoutConfig.getFolderLayoutInfo().folderAddAppLayoutTable;
return this.mFolderLayoutConfig.getFolderLayoutInfo()?.folderAddAppLayoutTable;
}
/**