Handle MaybeLocal value from the constructor
In case of exception occuring during construction
of a Sass type instance just return Undefined value,
as the delayed JS exception will pop up later.
The following code:
var sass = require('./');
sass.render({
data: 'div { color: foo(); }',
functions: {
'foo()': function() {
return sass.types.Color(2,3);
}
}
});
now results in an libsass error
Constructor should be invoked with either 0, 1, 3 or 4 arguments
instead of V8 abort
FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal
Showing
Please
register
or
sign in
to comment