less / less.js

Less. The dynamic stylesheet language.
http://lesscss.org
Apache License 2.0
17k stars 3.41k forks source link

refactor: Modify this pointer so that it is not empty. #3719

Closed lumburr closed 1 year ago

lumburr commented 2 years ago

What: get correct this

Why:
this === undefined https://github.com/less/less.js/blob/1eafc06db4ed062761ce6ca65044204cf32308a1/packages/less/src/less/functions/number.js#L54 image

How:

Checklist:

iChenLei commented 2 years ago

Can you add special unit tests for this PR ? Thanks

lumburr commented 2 years ago

@iChenLei I've added some special test cases.:sweat_smile: