Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not display preview if there is nothing to preview #1273

Merged
merged 1 commit into from
Jun 26, 2017

Conversation

xPaw
Copy link
Member

@xPaw xPaw commented Jun 26, 2017

No description provided.

@xPaw xPaw added Type: Bug Issues that report and PRs that solve any defects that cause unexpected behaviors. Type: Feature Tickets that describe a desired feature or PRs that add them to the project. labels Jun 26, 2017
@xPaw xPaw added this to the 2.3.3 milestone Jun 26, 2017
@@ -74,11 +74,13 @@ function parse(msg, url, res, client) {
// Verify that thumbnail pic exists and is under allowed size
if (toggle.thumb.length) {
fetch(escapeHeader(toggle.thumb), (resThumb) => {
if (!(/^image\/.+/.test(resThumb.type)) || resThumb.size > (Helper.config.prefetchMaxImageSize * 1024)) {
if (resThumb === null
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes crash on master, @astorije

@astorije astorije merged commit f516d21 into master Jun 26, 2017
@astorije astorije deleted the xpaw/no-preview branch June 26, 2017 06:36
matburnham pushed a commit to matburnham/lounge that referenced this pull request Sep 6, 2017
Do not display preview if there is nothing to preview
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issues that report and PRs that solve any defects that cause unexpected behaviors. Type: Feature Tickets that describe a desired feature or PRs that add them to the project.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants