File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -36,12 +36,12 @@ function askForFoldersAccess(folder) {
3636 return permissions . askForFoldersAccess . call ( this , folder )
3737}
3838
39- function askForCalendarAccess ( type ) {
40- if ( ! [ 'write-only' , 'full' ] . includes ( type ) ) {
41- throw new TypeError ( `${ type } must be one of either 'write-only' or 'full'` )
39+ function askForCalendarAccess ( accessLevel = 'write-only' ) {
40+ if ( ! [ 'write-only' , 'full' ] . includes ( accessLevel ) ) {
41+ throw new TypeError ( `${ accessLevel } must be one of either 'write-only' or 'full'` )
4242 }
4343
44- return permissions . askForCalendarAccess . call ( this , type )
44+ return permissions . askForCalendarAccess . call ( this , accessLevel )
4545}
4646
4747function askForScreenCaptureAccess ( openPreferences = false ) {
Original file line number Diff line number Diff line change @@ -511,7 +511,7 @@ bool HasOpenSystemPreferencesDialog() {
511511
512512 __block Napi::ThreadSafeFunction tsfn = ts_fn;
513513 if (@available (macOS 14.0 , *)) {
514- const std::string type = info[0 ].As <Napi::String>().Utf8Value ();
514+ const std::string access_level = info[0 ].As <Napi::String>().Utf8Value ();
515515
516516 EKEventStoreRequestAccessCompletionHandler handler =
517517 ^(BOOL granted, NSError *error) {
@@ -523,7 +523,7 @@ bool HasOpenSystemPreferencesDialog() {
523523 tsfn.Release ();
524524 };
525525
526- if (type == " full" ) {
526+ if (access_level == " full" ) {
527527 [[EKEventStore new ] requestFullAccessToEventsWithCompletion: handler];
528528 } else {
529529 [[EKEventStore new ] requestWriteOnlyAccessToEventsWithCompletion: handler];
You can’t perform that action at this time.
0 commit comments