fix(lots errors): fixes to prevent crashes when sql server not connected
This commit is contained in:
@@ -25,7 +25,7 @@ export const updatePrinters = async () => {
|
||||
})
|
||||
);
|
||||
|
||||
if (prodError) {
|
||||
if (prodError || prodPrinters?.data.length > 10000) {
|
||||
//console.log(prodError);
|
||||
return {
|
||||
success: false,
|
||||
@@ -35,7 +35,7 @@ export const updatePrinters = async () => {
|
||||
}
|
||||
|
||||
// do the printer update into our db
|
||||
const prodPrinterInfo = prodPrinters.data;
|
||||
const prodPrinterInfo = prodPrinters?.data;
|
||||
|
||||
for (let i = 0; i < prodPrinterInfo.length; i++) {
|
||||
const printerStuff: any = {
|
||||
|
||||
Reference in New Issue
Block a user