-
Notifications
You must be signed in to change notification settings - Fork 14
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
Feat/aspect ratio #526
Feat/aspect ratio #526
Conversation
abstract/UploaderBlock.js
Outdated
uploadCollection.size === 1 && | ||
this.cfg.useCloudImageEditor && | ||
this.hasBlockInCtx((block) => block.activityType === ActivityBlock.activities.CLOUD_IMG_EDIT) | ||
) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4 условия и несколько циклов. Новому человеку, конечно, трудно будет во всем этом разбираться
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Условие не рефачил, но весь блок кода вытащил отдельно
try { | ||
fetch(createCdnUrl(this.$['*originalUrl'], createCdnUrlModifiers('json'))) | ||
.then((response) => response.json()) | ||
.then((json) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
async синтаксис здесь не получается сделать?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Да, теперь можно, остался хвост, раньше там надо было это совсем асинхронно делать
} | ||
} | ||
return message.url; | ||
})(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Страшно, вырубай
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Согласен, вырубил :)
#393