mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-14 21:27:23 +01:00
WIP(shops): safer debug mode
This commit is contained in:
@@ -353,10 +353,13 @@ const mockAnalyticsService = {
|
||||
|
||||
// Return the production or mock service based on the current environment
|
||||
function getServiceByEnvironment () {
|
||||
return {
|
||||
track,
|
||||
trackPurchase,
|
||||
};
|
||||
if (nconf.get('IS_PROD') || (nconf.get('DEBUG_ENABLED') && !nconf.get('BASE_URL').includes('localhost'))) {
|
||||
return {
|
||||
track,
|
||||
trackPurchase,
|
||||
};
|
||||
}
|
||||
return mockAnalyticsService;
|
||||
}
|
||||
|
||||
export {
|
||||
|
||||
Reference in New Issue
Block a user