mirror of https://github.com/keeweb/keeweb
cleaned up useless conditions
parent
61067391b6
commit
7123345341
|
@ -858,7 +858,7 @@ class AppModel {
|
|||
path = Storage[storage].getPathForName(file.name);
|
||||
}
|
||||
const optionsForLogging = { ...options };
|
||||
if (optionsForLogging && optionsForLogging.opts && optionsForLogging.opts.password) {
|
||||
if (optionsForLogging.opts && optionsForLogging.opts.password) {
|
||||
optionsForLogging.opts = { ...optionsForLogging.opts };
|
||||
optionsForLogging.opts.password = '***';
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ class MenuSectionModel extends Model {
|
|||
removeByFile(file) {
|
||||
const items = this.items;
|
||||
items.find((item) => {
|
||||
if (item.file === file || item.file === file) {
|
||||
if (item.file === file) {
|
||||
items.remove(item);
|
||||
return true;
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ class MenuSectionModel extends Model {
|
|||
replaceByFile(file, newItem) {
|
||||
const items = this.items;
|
||||
items.find((item, ix) => {
|
||||
if (item.file === file || item.file === file) {
|
||||
if (item.file === file) {
|
||||
items[ix] = newItem;
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -686,9 +686,7 @@ class AppView extends View {
|
|||
this.views.open.toggleMore();
|
||||
}
|
||||
} else {
|
||||
if (menuItem) {
|
||||
this.model.menu.select({ item: menuItem });
|
||||
}
|
||||
this.model.menu.select({ item: menuItem });
|
||||
}
|
||||
} else {
|
||||
this.showSettings();
|
||||
|
|
|
@ -64,7 +64,7 @@ class FieldViewDate extends FieldViewText {
|
|||
this.picker = null;
|
||||
}
|
||||
newVal = new Date(newVal);
|
||||
if (!newVal || isNaN(newVal.getTime())) {
|
||||
if (isNaN(newVal.getTime())) {
|
||||
newVal = null;
|
||||
}
|
||||
super.endEdit(newVal, extra);
|
||||
|
|
|
@ -104,7 +104,7 @@ class FieldViewOtp extends FieldViewText {
|
|||
this.resetOtp();
|
||||
return;
|
||||
}
|
||||
this.otpValue = pass || '';
|
||||
this.otpValue = pass;
|
||||
this.otpTimeLeft = timeLeft || 0;
|
||||
this.otpValidUntil = Date.now() + timeLeft;
|
||||
if (!this.editing) {
|
||||
|
|
Loading…
Reference in New Issue