Rewrite the restricted iterators and reorder the forward references. [skip build]
This commit is contained in:
@@ -38,7 +38,8 @@ function scopesFromSelection(
|
||||
topic?: string,
|
||||
): Array<{ roomId: string; sectionTitle?: string; topicName?: string }> {
|
||||
if (topic) {
|
||||
for (const section of sections) {
|
||||
for (let i = 0; i < sections.length; i += 1) {
|
||||
const section = sections[i];
|
||||
const match = section.topics.find((t) => t.roomId === topic);
|
||||
if (match) {
|
||||
return [{ roomId: match.roomId, sectionTitle: section.title, topicName: match.name }];
|
||||
|
||||
Reference in New Issue
Block a user