Skip to content

Try fix when script run with TamperMonkey or GreaseMonkey #3655

Closed
ITSecOps-404/aports
#1
@langren1353

Description

@langren1353

When useing TamperMonkey or GreaseMonkey with less.js as a @require resource, sometimes there will be an error.
I trace the code found a small problem.
At https://github.com/less/less.js/blob/master/packages/less/src/less-browser/utils.js
function addDataAttrs param tag may be null, then the script will exec failed.
A short if may fix this, will you please add the code to check if tag is null

Activity

iChenLei

iChenLei commented on Oct 10, 2021

@iChenLei
Member

Hi, @langren1353 PR welcome !

langren1353

langren1353 commented on Oct 10, 2021

@langren1353
ContributorAuthor

Well, I submit one RP, hope that would work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @iChenLei@langren1353

      Issue actions

        Try fix when script run with TamperMonkey or GreaseMonkey · Issue #3655 · less/less.js