You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the fetch for the Room Availability feature fails, the error is not caught and reported accordingly resulting in a stream of extension/console errors. I believe this can be fixed by using a .catch before .then in FreeRooms:getAvailableRooms.
Also I think a lot of the code can be written more nicely with the new jQuery style syntax through Cash. For example, the following:
$(td).each((i,x)=>{// The reason why we need to do $(x) is because x is an HTMLElement, which can only// be manipulated with native JavaScript (i.e. x.hasAttr('colspan'), x.innerHTML)letcolspan=$(x).attr('colspan');if(colspan){totalColspan+=parseInt(colspan);if(totalColspan>=colspanTime){if($(x).html()===''){flag=true;}else{break;}}}})
The text was updated successfully, but these errors were encountered:
When the fetch for the Room Availability feature fails, the error is not caught and reported accordingly resulting in a stream of extension/console errors. I believe this can be fixed by using a
.catch
before.then
inFreeRooms:getAvailableRooms
.Also I think a lot of the code can be written more nicely with the new jQuery style syntax through Cash. For example, the following:
stevens-web-extension/src/features/FreeRooms/FreeRooms.ts
Lines 123 to 135 in 3f4fc5c
can be simplified to:
The text was updated successfully, but these errors were encountered: