File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
src/core/features/reminders/components/date Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,14 @@ export class CoreRemindersDateComponent {
4343 readonly url = input ( '' ) ;
4444
4545 readonly showReminderButton = computed ( ( ) => {
46+ // If not set, button won't be shown.
47+ const component = this . component ( ) ;
48+ const instanceId = this . instanceId ( ) ;
49+ const type = this . type ( ) ;
50+ if ( component === undefined || instanceId === undefined || type === undefined ) {
51+ return false ;
52+ }
53+
4654 const remindersEnabled = CoreReminders . isEnabled ( ) ;
4755
4856 return remindersEnabled && this . time ( ) > CoreTime . timestamp ( ) ;
@@ -53,15 +61,11 @@ export class CoreRemindersDateComponent {
5361
5462 constructor ( ) {
5563 effect ( async ( ) => {
56- if ( ! this . showReminderButton ( ) ) {
57- return ;
58- }
59-
60- // If not set, button won't be shown.
6164 const component = this . component ( ) ;
6265 const instanceId = this . instanceId ( ) ;
6366 const type = this . type ( ) ;
64- if ( component === undefined || instanceId === undefined || type === undefined ) {
67+
68+ if ( ! this . showReminderButton ( ) || component === undefined || instanceId === undefined || type === undefined ) {
6569 return ;
6670 }
6771
You can’t perform that action at this time.
0 commit comments