Bug 1512956 - Ensure empty string is considered valid CSS authoredText; r=pbro
When removing all declarations from a rule via the Rule view, the authoredText value ends up as an empty string. This patch ensures that the fallback cssText is not used in that case because that accidentally restores the whole declaration block when re-parsing the text of the rule. Differential Revision: https://phabricator.services.mozilla.com/D14753
This commit is contained in:
@@ -270,7 +270,7 @@ function cssTrim(str) {
|
||||
function parseDeclarationsInternal(isCssPropertyKnown, inputString,
|
||||
parseComments, inComment, commentOverride) {
|
||||
if (inputString === null || inputString === undefined) {
|
||||
throw new Error("empty input string");
|
||||
return [];
|
||||
}
|
||||
|
||||
const lexer = getCSSLexer(inputString);
|
||||
|
||||
Reference in New Issue
Block a user