Skip to content

Commit bfe4493

Browse files
author
Matthew Becker
committed
Remove "EMPTY" shifts from active shift display
Due to an error in the if tree, EMPTY shifts were being colored as active. This has been fixed. Also added a missing let to color_schedule_config
1 parent d7d6791 commit bfe4493

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/background.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ chrome.storage.sync.get({
212212
user_shift: "rgba(255, 255, 0, 0.5)",
213213
else: undefined
214214
}
215-
color_schedule_config = []
215+
let color_schedule_config = []
216216

217217
// Find the technicians getting on
218218
let technicians_starting = [];
@@ -273,8 +273,10 @@ chrome.storage.sync.get({
273273
} else if ((row[6] < time_to_check && row[7] > time_to_check) && (configuration_dict.ss_ignore_filter || configuration_dict.shifts_to_show.includes(row[2]))){
274274
if (row[3] == user){
275275
color_schedule_config.push(colors.user_shift)
276-
} else {
276+
} else if (row[3] != "---EMPTY---") {
277277
color_schedule_config.push(colors.active)
278+
} else {
279+
color_schedule_config.push(colors.else)
278280
}
279281

280282
// Else shift is not active and complies with filter conditions

0 commit comments

Comments
 (0)