mirror of
https://github.com/misskey-dev/misskey.git
synced 2025-04-27 19:42:51 +02:00
fix(frontend): 本番環境で不必要なconsole.logを出さないように (#15702)
This commit is contained in:
parent
3f7a2bf5b5
commit
5513337198
5 changed files with 9 additions and 9 deletions
packages/frontend/src
|
@ -380,7 +380,7 @@ function prepend(item: MisskeyEntity): void {
|
|||
return;
|
||||
}
|
||||
|
||||
console.log(isHead(), isPausingUpdate);
|
||||
if (_DEV_) console.log(isHead(), isPausingUpdate);
|
||||
|
||||
if (isHead() && !isPausingUpdate) unshiftItems([item]);
|
||||
else prependQueue(item);
|
||||
|
|
|
@ -142,11 +142,11 @@ export class PreferencesManager {
|
|||
const v = JSON.parse(JSON.stringify(value)); // deep copy 兼 vueのプロキシ解除
|
||||
|
||||
if (deepEqual(this.s[key], v)) {
|
||||
console.log('(skip) prefer:commit', key, v);
|
||||
if (_DEV_) console.log('(skip) prefer:commit', key, v);
|
||||
return;
|
||||
}
|
||||
|
||||
console.log('prefer:commit', key, v);
|
||||
if (_DEV_) console.log('prefer:commit', key, v);
|
||||
|
||||
this.rewriteRawState(key, v);
|
||||
|
||||
|
@ -250,13 +250,13 @@ export class PreferencesManager {
|
|||
if (!deepEqual(cloudValue, record[1])) {
|
||||
this.rewriteRawState(key, cloudValue);
|
||||
record[1] = cloudValue;
|
||||
console.log('cloud fetched', key, cloudValue);
|
||||
if (_DEV_) console.log('cloud fetched', key, cloudValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.save();
|
||||
console.log('cloud fetch completed');
|
||||
if (_DEV_) console.log('cloud fetch completed');
|
||||
}
|
||||
|
||||
public static newProfile(): PreferencesProfile {
|
||||
|
|
|
@ -153,7 +153,7 @@ export async function restoreFromCloudBackup() {
|
|||
scope: ['client', 'preferences', 'backups'],
|
||||
});
|
||||
|
||||
console.log(keys);
|
||||
if (_DEV_) console.log(keys);
|
||||
|
||||
if (keys.length === 0) {
|
||||
os.alert({
|
||||
|
@ -179,7 +179,7 @@ export async function restoreFromCloudBackup() {
|
|||
key: select.result,
|
||||
});
|
||||
|
||||
console.log(profile);
|
||||
if (_DEV_) console.log(profile);
|
||||
|
||||
miLocalStorage.setItem('preferences', JSON.stringify(profile));
|
||||
miLocalStorage.setItem('hidePreferencesRestoreSuggestion', 'true');
|
||||
|
|
|
@ -32,7 +32,7 @@ mainRouter.addListener('replace', ctx => {
|
|||
});
|
||||
|
||||
mainRouter.addListener('change', ctx => {
|
||||
console.log('mainRouter: change', ctx.fullPath);
|
||||
if (_DEV_) console.log('mainRouter: change', ctx.fullPath);
|
||||
analytics.page({
|
||||
path: ctx.fullPath,
|
||||
title: ctx.fullPath,
|
||||
|
|
|
@ -8,4 +8,4 @@ import { v4 as uuid } from 'uuid';
|
|||
// HMR有効時にバグか知らんけど複数回実行されるのでその対策
|
||||
export const TAB_ID = window.sessionStorage.getItem('TAB_ID') ?? uuid();
|
||||
window.sessionStorage.setItem('TAB_ID', TAB_ID);
|
||||
console.log('TAB_ID', TAB_ID);
|
||||
if (_DEV_) console.log('TAB_ID', TAB_ID);
|
||||
|
|
Loading…
Add table
Reference in a new issue