Closed clarkwinkelmann closed 3 years ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We do this to keep the amount of open issues to a manageable minimum. In any case, thanks for taking an interest in this software and contributing by opening the issue in the first place!
Bug Report
Current Behavior Setting a completely white image as an avatar results in
this.getPalette(...) is null
errors thrown in the javascript console.I don't think this will interfere with the page rendering, because it happens inside of the async
onload
callback in https://github.com/flarum/core/blob/9627eb73f103fae4dff1680cc5f972277db6cae7/js/src/common/models/User.js#L93but it floods the console with errors.
Steps to Reproduce
Expected Behavior The error should be silenced.
Environment
Possible Solution Ideally this should be fixed or better handled in the
color-thief
library so we don't need to catch anull
error from inside their library.However there are issues opened about this on their repo since 2015 and there doesn't seem to be much activity.
I have added a comment to the older of the issues I could find https://github.com/lokesh/color-thief/issues/40
If ColorThief doesn't make any change, the easiest solution for us would probably be to just catch and silence any error that results from calling ColorThief.