mirror of
https://github.com/danog/dart-sass.git
synced 2024-12-12 09:09:39 +01:00
a95c5b8ccb
Doing this for variable *nodes* was breaking in extremely specific circumstances: * A null node is passed into setVariable() and, if source maps are enabled, recorded in _variableNodes. * Later on, getVariableNode() is called for that variable. Because that variable's node is null, it calls _getVariableNodeFromGlobalModule() even though the variable is actually defined. * _getVariableNodeFromGlobalModule() sets _lastVariableIndex to 0 on the assumption that the variable is undefined, which turns out to be incorrect in this specific case. The next commit will fix the issue where a null node can be passed into setVariable() when source maps are enabled, but it makes more sense to assign the variable index to 0 in the variable access anyway, since it happens first and isn't skipped when source maps are disabled. |
||
---|---|---|
.. | ||
cli | ||
dart_api | ||
node_api | ||
compressed_test.dart | ||
dart_api_test.dart | ||
doc_comments_test.dart | ||
double_check_test.dart | ||
ensure_npm_package.dart | ||
hybrid.dart | ||
node_api_test.dart | ||
output_test.dart | ||
repo_test.dart | ||
source_map_test.dart | ||
utils.dart |