Skip to content

Commit c38298d

Browse files
committed
fix(menu): fixed menu not working for some zap customers
1 parent d7b78f8 commit c38298d

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

core/globalData.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ if (osTypeVar === 'Windows_NT') {
3434
}
3535

3636
//Simple env vars
37-
const isPterodactyl = !isWindows && process.env?.TXADMIN_ENABLE === '1';
3837
const ignoreDeprecatedConfigs = process.env?.TXHOST_IGNORE_DEPRECATED_CONFIGS === 'true';
3938

4039

@@ -248,13 +247,12 @@ const profilePath = cleanPath(path.join(dataPath, profileName));
248247
/**
249248
* MARK: ZAP & NETWORKING
250249
*/
251-
let isZapHosting = false;
252250
let zapVars: ReturnType<typeof getZapVars> | undefined;
253251
if (!ignoreDeprecatedConfigs) {
252+
//FIXME: ZAP doesn't need this anymore, remove ASAP
254253
const zapCfgFilePath = path.join(dataPath, 'txAdminZapConfig.json');
255254
try {
256255
zapVars = getZapVars(zapCfgFilePath);
257-
isZapHosting = !!zapVars && !isPterodactyl;
258256
if (!_txDevEnv.ENABLED) fsp.unlink(zapCfgFilePath).catch(() => { });
259257
} catch (error) {
260258
fatalError.GlobalData(9, 'Failed to load with ZAP-Hosting configuration.', error);
@@ -471,6 +469,9 @@ if (ignoreDeprecatedConfigs) {
471469
console.verbose.debug('TXHOST_IGNORE_DEPRECATED_CONFIGS is set to true. Ignoring deprecated configs.');
472470
}
473471

472+
const isPterodactyl = !isWindows && process.env?.TXADMIN_ENABLE === '1';
473+
const isZapHosting = providerName === 'ZAP-Hosting';
474+
474475
//Quick config to disable ads
475476
const displayAds = process.env?.TXHOST_TMP_HIDE_ADS !== 'true' || isPterodactyl || isZapHosting;
476477
const adSchema = z.object({

0 commit comments

Comments
 (0)