فهرست منبع

fix null check

zahmis 4 سال پیش
والد
کامیت
104f2c9027
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      src/server/routes/apiv3/slack-integration-settings.js

+ 1 - 1
src/server/routes/apiv3/slack-integration-settings.js

@@ -259,7 +259,7 @@ module.exports = (crowi) => {
       tokenPtoG = 'v2';
       tokenPtoG = 'v2';
       // eslint-disable-next-line no-await-in-loop
       // eslint-disable-next-line no-await-in-loop
       checkTokens = await SlackAppIntegration.findOne({ $or: [{ tokenGtoP }, { tokenPtoG }] });
       checkTokens = await SlackAppIntegration.findOne({ $or: [{ tokenGtoP }, { tokenPtoG }] });
-    } while (checkTokens);
+    } while (checkTokens != null);
 
 
     try {
     try {
       const slackAppTokens = await SlackAppIntegration.create({ tokenGtoP, tokenPtoG });
       const slackAppTokens = await SlackAppIntegration.create({ tokenGtoP, tokenPtoG });