bug #11612 Don't call the backend if the notification bar is disabled (mikemix)

This PR was merged into the 1.7 branch.

Discussion
----------

Don't make unnecessary backend calls if the notification bar is missing (eg. disabled).

| Q               | A
| --------------- | -----
| Branch?         | 1.7
| Bug fix?        | yes
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | fixes #11604
| License         | MIT


Commits
-------

d584dc31d1 Don't call the backend if the notification bar is disabled
This commit is contained in:
Łukasz Chruściel 2020-06-30 09:50:42 +02:00 committed by GitHub
commit a2c5102d94
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -33,6 +33,11 @@ const getDismissedSyliusVersion = function getDismissedSyliusVersion() {
$.fn.extend({
notification() {
const notificationMenu = $('#sylius-version-notification');
if (0 === notificationMenu.length) {
return;
}
const askFrequency = notificationMenu.attr('data-frequency') * MILISECONDS_MULTIPLIER;
const getCurrentSyliusVersion = function getCurrentSyliusVersion() {