Skip to content

Commit

Permalink
refactor: Combined calls to GetContextPanel()
Browse files Browse the repository at this point in the history
  • Loading branch information
Panzerhandschuh committed Apr 8, 2024
1 parent 9670266 commit f342ff8
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions scripts/pages/map-selector/map-entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,12 @@ class MapEntry {
}

static showContextMenu() {
const mapData = $.GetContextPanel().mapData;
if (!mapData) return;

const userMapData = $.GetContextPanel().userMapData;
if (!userMapData) return;
const { mapData, userMapData, isDownloading } = $.GetContextPanel();
if (!mapData || !userMapData) {
return;
}

const items = [];
const isDownloading = $.GetContextPanel().isDownloading;
const mapID = mapData.id;

if (userMapData.mapFileExists) {
Expand Down

0 comments on commit f342ff8

Please sign in to comment.