Fixed: [弱掃] p11.2 Bad use of null-like value
| | |
| | | |
| | | //////////////////////////////////////////////////////////// |
| | | |
| | | mounted() { |
| | | this.isUserLogin = authService.isUserLogin(); |
| | | reviewsService.readAllMyNotification().then(res => res); |
| | | async mounted() { |
| | | this.isUserLogin = authService.isUserLogin(); |
| | | |
| | | try { |
| | | const response = await reviewsService.readAllMyNotification(); |
| | | if (response !== null) { |
| | | } else { |
| | | throw new Error('reviewsService.readAllMyNotification returned null-like value.'); |
| | | } |
| | | } catch (error) { |
| | | console.error('An error occurred while reading all notifications:', error); |
| | | throw error; |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | </script> |