Skip to content
New issue

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

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

Already on GitHub? # to your account

Failed to compress valid JS (axios library) #336

Open
tugibaev opened this issue May 10, 2020 · 0 comments
Open

Failed to compress valid JS (axios library) #336

tugibaev opened this issue May 10, 2020 · 0 comments

Comments

@tugibaev
Copy link

Valid full size code:

$(document).ready(function () {
    $(".add-cart").click(function (event) {
        event.preventDefault();
        $entry = $(this).attr("data");
        $count = $("#numCount").val();


        axios.post("/cartadd/", {
            "entry": $entry,
            "count": $count
        })
        .then(function (html) {
                $("#dlgCartAddBody").html(html);
                $("#dlgCartAdd").modal();
            })
        .catch(function () {
                alert("error");
            });
    });
});

can't be compressed. May be .then( or .catch( problem... Axios is good use JS library for AJAX, but code can't be compressed...

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant