web: do not enforce telemetry setting causing it to reset

This commit is contained in:
Abdullah Atta
2023-02-06 10:50:25 +05:00
committed by Abdullah Atta
parent 289ef2a324
commit 746fc2963e

View File

@@ -20,10 +20,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
import Config from "./config";
export function isTelemetryEnabled() {
return (
process.env.NODE_ENV === "production" &&
(Config.get("telemetry", doNotTrack()) || !doNotTrack())
);
// telemetry is always disabled in DEBUG/TEST mode
if (process.env.NODE_ENV !== "production") return false;
return Config.get("telemetry", !doNotTrack());
}
export function setTelemetry(state: boolean) {