已开启
fix: 判空处理 #7
dangdangallison创建于 7月23日
fix: 判空处理 #7
已开启
共 1 个文件变更+1-1
| @@ -37,7 +37,7 @@ export struct ContactPage { | |||
| 37 | aboutToAppear(): void { | 37 | aboutToAppear(): void { |
| 38 | this.getUIContext().setKeyboardAvoidMode(KeyboardAvoidMode.RESIZE); | 38 | this.getUIContext().setKeyboardAvoidMode(KeyboardAvoidMode.RESIZE); |
| 39 | try { | 39 | try { |
| 40 | - WindowUtil.getWindowClass().on('keyboardHeightChange', this.changeCallback); | 40 | + WindowUtil.getWindowClass()?.on('keyboardHeightChange', this.changeCallback); |
| 41 | } catch (error) { | 41 | } catch (error) { |
| 42 | const err: BusinessError = error as BusinessError; | 42 | const err: BusinessError = error as BusinessError; |
| 43 | Logger.error(CommonConstants.TAG, | 43 | Logger.error(CommonConstants.TAG, |