less.js icon indicating copy to clipboard operation
less.js copied to clipboard

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

Open lumburr opened this issue 2 years ago • 2 comments

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:

  • [ ] Documentation N/A
  • [ ] Added/updated unit tests N/A
  • [x] Code complete

lumburr avatar Apr 25 '22 09:04 lumburr

Can you add special unit tests for this PR ? Thanks

iChenLei avatar Apr 25 '22 10:04 iChenLei

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

lumburr avatar Apr 26 '22 01:04 lumburr