Show error in tooltip (#566)

* Show error in tooltip

* Move error.message check
This commit is contained in:
Rob Garrison 2018-11-19 22:55:38 -06:00 committed by GitHub
parent df2b08a75a
commit 99951efc80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -148,6 +148,9 @@ function reportUpdateState({updated, style, error, STATES}) {
error = t('updateCheckSkippedLocallyEdited') + '\n' + t('updateCheckManualUpdateHint'); error = t('updateCheckSkippedLocallyEdited') + '\n' + t('updateCheckManualUpdateHint');
} else if (error === STATES.MAYBE_EDITED) { } else if (error === STATES.MAYBE_EDITED) {
error = t('updateCheckSkippedMaybeLocallyEdited') + '\n' + t('updateCheckManualUpdateHint'); error = t('updateCheckSkippedMaybeLocallyEdited') + '\n' + t('updateCheckManualUpdateHint');
} else if (typeof error === 'object' && error.message) {
// UserCSS meta errors provide an object
error = error.message;
} }
const message = same ? t('updateCheckSucceededNoUpdate') : error; const message = same ? t('updateCheckSucceededNoUpdate') : error;
newClasses.set('no-update', true); newClasses.set('no-update', true);