Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

eslint: Fix unicorn/no-optional-chaining-on-undeclared-variable.

Anders Kaseorgd9deb095a467
diff --git a/tools/screenshots/message-screenshot.ts b/tools/screenshots/message-screenshot.ts
index c8fb1be1996..3c310e36c0c 100644
--- a/tools/screenshots/message-screenshot.ts
+++ b/tools/screenshots/message-screenshot.ts
@@ -1,4 +1,4 @@
-/* global CSS */
+/* global CSS, zulip_test */
import * as assert from "node:assert/strict";
import * as fs from "node:fs";
@@ -66,7 +66,6 @@ async function run(): Promise<void> {
await page.goto(`${realmUrl}/#narrow/id/${messageId}`, {
waitUntil: "networkidle2",
});
- // eslint-disable-next-line no-undef
const message_list_id = await page.evaluate(() => zulip_test.current_msg_list?.id);
assert.ok(message_list_id !== undefined);
const messageSelector = `#message-row-${message_list_id}-${CSS.escape(messageId)}`;
diff --git a/tools/screenshots/thread-screenshot.ts b/tools/screenshots/thread-screenshot.ts
index e76bcfb0257..1614179cf60 100644
--- a/tools/screenshots/thread-screenshot.ts
+++ b/tools/screenshots/thread-screenshot.ts
@@ -1,4 +1,4 @@
-/* global CSS */
+/* global CSS, zulip_test */
import * as assert from "node:assert/strict";
import * as fs from "node:fs";
@@ -74,7 +74,6 @@ async function run(): Promise<void> {
await page.goto(narrowUri, {
waitUntil: "networkidle2",
});
- // eslint-disable-next-line no-undef
const message_list_id = await page.evaluate(() => zulip_test.current_msg_list?.id);
assert.ok(message_list_id !== undefined);
const messageListSelector = "#message-lists-container";