[FIXED][BUG] Uncaught TypeError: Cannot read property 'length' of undefined

Author Posts

ddenev

After updating to the latest version (5.8.3.0) I started getting these errors. Happens while I am editing one of my SCSS selectors (editing the SASS code).

Full stack trace:

Uncaught TypeError: Cannot read property 'length' of undefined
    at Object.add_final_compile_data (deps.js:1)
    at Object.apply_sass_post_css (microthemer.js:1)
    at Object.update_nodes_with_compiled_css (microthemer.js:1)
    at Object.cb15714841052260.1215060711889655 (microthemer.js:1)
    at Sass._handleWorkerMessage (sass.js:138)

After this error I am no longer able to edit any of the other selectors which I could previously (before editing this particular selector) edit without a problem.

The selector in question looks quite normal, here is the code:

#machine-types-container {
    .ct-new-columns > .ct-div-block {
        $machines-menu-width: 260px;
        padding: 0;
        &:first-child {
            width: calc((100% - 30px)*0.25);
            @media (max-width: 1024px) {
                width: $machines-menu-width;
                //width: calc((100% - 30px)*0.32);
            }
            @media (max-width: 767px) {
                display: none;
            }
        }
        &:nth-child(2) {
            width: calc((100% - 30px)*0.75);
            @media (max-width: 1024px) {
                width: calc(100% - #{$machines-menu-width} - 30px);
                //width: calc((100% - 30px)*0.68);
            }
            @media (max-width: 767px) {
                width: 100%;
            }
        }
    }
}

ddenev

Reverting back to 5.8.2.9 5.8.2.7 as this is breaking my work.
Version 5.8.2.9 has the same problem.


ddenev

Dear Sebastian,

Where can I download version 5.8.2.8 (the last one that worked before the error above)?

I seem to have deleted it from my drive.

BTW, can you make it possible to download old versions of MT from the themeover site? Sometimes it is lifesaving to be able to revert to a previous version 🙂


Sebastian

Hey Drago,

Sorry for the slow reply, I was out and about today. Here is version 5.8.2.7. From the error you reported, it looks like an issue with the recent vendor prefix support for Sass I added. I will release a fix today or tomorrow. And I will also add a previous versions archive to the website at some point this week 🙂

Cheers,
Sebastian


ddenev

Thank you very much, Sebastian!


Sebastian

Hi Drago,

5.8.3.1 should fix this for you. As I suspected, Sass selectors with nested media queries caused an error with the auto-prefixer script. If you encounter any more issues after upgrading, perhaps you could send me an export of your settings so I can cater for everything.

Thanks,
Sebastian


ddenev

Hi Sebastian,

Now everything works like a charm. Thank you very much for fixing this!

Best regards!

You must login or register to reply to this topic.