Skip to content

Commit

Permalink
fix #3646, forcefully change unsupported input to strings (#3658)
Browse files Browse the repository at this point in the history
Co-authored-by: gzb1128 <gzb1128@foxmail.com>
  • Loading branch information
gzb1128 and gzb1128 authored Nov 11, 2021
1 parent a10c339 commit 8666b01
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/less/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ module.exports = function(grunt) {
`node bin/lessc --clean-css="--s1 --advanced" ${lessFolder}/_main/lazy-eval.less tmp/lazy-eval.css`,
"cd lib",
`node ../bin/lessc --clean-css="--s1 --advanced" ../${lessFolder}/_main/lazy-eval.less ../tmp/lazy-eval.css`,
`node ../bin/lessc --source-map=lazy-eval.css.map --autoprefix ../${lessFolder}/_main/lazy-eval.less ../tmp/lazy-eval.css`,
"cd ..",
// Test multiple plugins
`node bin/lessc --plugin=clean-css="--s1 --advanced" --plugin=autoprefix="ie 11,Edge >= 13,Chrome >= 47,Firefox >= 45,iOS >= 9.2,Safari >= 9" ${lessFolder}/_main/lazy-eval.less tmp/lazy-eval.css`
Expand Down
3 changes: 3 additions & 0 deletions packages/less/bin/lessc
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ function render() {
var filename = sourceMapOptions.sourceMapFullFilename;
ensureDirectory(filename);

//To fix https://github.com/less/less.js/issues/3646
output=output.toString();

fs.writeFile(filename, output, 'utf8', function (err) {
if (err) {
var description = 'Error: ';
Expand Down

0 comments on commit 8666b01

Please sign in to comment.