Skip to content
Snippets Groups Projects
Unverified Commit 4269b450 authored by Martijn Braam's avatar Martijn Braam
Browse files

Fix CSS writer for cases where the css file was missing

parent e3f83862
No related branches found
No related tags found
No related merge requests found
......@@ -254,7 +254,7 @@ class Setting:
if clear and line.strip() == self.guard_start:
ignore = True
continue
if not ignore:
result.append(line)
......@@ -271,7 +271,7 @@ class Setting:
result.append('}\n')
if not found and not clear:
if not result[-1].endswith('\n'):
if len(result) > 0 and not result[-1].endswith('\n'):
result.append('\n')
result.append(self.guard_start + '\n')
result.append(self.selector + ' {\n')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment