Skip to content
This repository was archived by the owner on Apr 29, 2023. It is now read-only.
This repository was archived by the owner on Apr 29, 2023. It is now read-only.

Little issue with mixins #7

@zouloux

Description

@zouloux

Hi there,
Thanks for this plugin, really handy ! I use it to have the same breakpoint values between my CSS and JS.

Anyway, i encountered an issue with mixins. I think this is maybe due to a Less lib update.

When I have a mixin :

.testMixin
{
}

grunt is telling me this : Warning: Cannot read property 'substr' of undefined Use --force to continue.

So I checked the source code and the only substr is here :
https://github.com/ixrock/grunt-less2js/blob/master/tasks/less2js.js#L58

When checking rule.variable on mixins this is true because rule.variable is a function. But when calling rule.name.substr(1) this is crashing.

Maybe adding : rule.variable == true can solve the issue ?

What do you think ?
Thanks :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions