Skip to content

Commit 7335fcf

Browse files
committed
chore: hoist getUi I/O
1 parent eac816b commit 7335fcf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/cal-to-sheet/cal-to-sheet.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ function updateSheetFromCalendar(_nonce, io = {}) {
2323
)[0],
2424
// Get today's date (for the start of the query)
2525
today = new Date(),
26+
ui = SpreadsheetApp.getUi(),
2627
} = io;
2728

2829
const calendarId = calendar.getId();
@@ -79,7 +80,7 @@ function updateSheetFromCalendar(_nonce, io = {}) {
7980
sheet.getRange(firstRow, 1, 1, 6).setFontWeight('bold');
8081
}
8182
} else {
82-
SpreadsheetApp.getUi().alert(
83+
ui.alert(
8384
'Info',
8485
'No events found in the specified calendar for the given date range.',
8586
SpreadsheetApp.Ui.ButtonSet.OK,

0 commit comments

Comments
 (0)