Fixed save bug when model info view is not visible.
This commit is contained in:
@@ -1866,11 +1866,6 @@ class ModelInfoView {
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @returns {boolean} */
|
|
||||||
isVisible() {
|
|
||||||
return this.element.style.display === "none";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @returns {void} */
|
/** @returns {void} */
|
||||||
show() {
|
show() {
|
||||||
this.element.style = "";
|
this.element.style = "";
|
||||||
@@ -1882,6 +1877,10 @@ class ModelInfoView {
|
|||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
async trySave(promptUser) {
|
async trySave(promptUser) {
|
||||||
|
if (this.element.style.display === "none") {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
const noteValue = this.elements.notes.value;
|
const noteValue = this.elements.notes.value;
|
||||||
const savedNotesValue = this.#savedNotesValue;
|
const savedNotesValue = this.#savedNotesValue;
|
||||||
if (noteValue.trim() === savedNotesValue.trim()) {
|
if (noteValue.trim() === savedNotesValue.trim()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user