Style installation: Don't prompt on validation error in silent mode

This commit is contained in:
Abe Jellinek 2025-08-25 12:43:34 -04:00 • committed by Dan Stillman
parent 08e4d6b06b
commit 5c95c35743

View file

@ -445,11 +445,11 @@ Zotero.Styles = new function () {
.catch(function (validationErrors) {
Zotero.logError("Style from " + origin + " failed to validate:\n\n" + validationErrors);
// If validation fails on the parent of a dependent style, ignore it (for now)
if(hidden) return;
// If this is the parent of a dependent style, or if we're in
// silent mode, suppress the prompt
if (hidden || silent) return;
// If validation fails on a different style, we ask the user if s/he really
// wants to install it
// Otherwise, ask the user whether to continue installing
var shouldInstall = Services.prompt.confirmEx(null,
Zotero.getString('styles.install.title'),
Zotero.getString('styles.validationWarning', [origin, Zotero.appName]),