Skip to content

Commit b667553

Browse files
davidperezgarraftaar1191davidperezgarernilambar
authored
Merge pull request #1214 from raftaar1191/fix/namer-error-display-1211
Fix: AI error message not display issue Co-authored-by: raftaar1191 <raftaar1191@git.wordpress.org> Co-authored-by: davidperezgar <davidperez@git.wordpress.org> Co-authored-by: ernilambar <nilambar@git.wordpress.org>
2 parents 457f08b + 02d69db commit b667553

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

assets/js/plugin-check-namer.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,12 @@
115115
if ( explainEl ) {
116116
setHtml( explainEl, '' );
117117
}
118+
if ( errorDiv ) {
119+
errorDiv.classList.add( 'plugin-check-namer-hidden' );
120+
}
118121
if ( errorEl ) {
119-
errorEl.classList.add( 'plugin-check-namer-hidden' );
120122
setText( errorEl, '' );
121123
}
122-
123124
if ( confusionPluginsDiv ) {
124125
confusionPluginsDiv.classList.add(
125126
'plugin-check-namer-hidden'
@@ -406,8 +407,11 @@
406407
? err.message
407408
: pluginCheckNamer.messages.genericError
408409
);
409-
if ( errorEl ) {
410-
errorEl.classList.remove( 'plugin-check-namer-hidden' );
410+
411+
if ( errorDiv ) {
412+
errorDiv.classList.remove(
413+
'plugin-check-namer-hidden'
414+
);
411415
}
412416
} )
413417
.finally( function () {

0 commit comments

Comments
 (0)