Skip to content

Commit bab6c55

Browse files
committed
feat(gradient-background.ts): prevented usrs from moving to the results page with input
closes #291
1 parent 45fbd5e commit bab6c55

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/pages/gradient-background.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,14 @@ export function gradientBackgroundGenerator() {
1414
const getDegreeElement = utils.getRange(attribute);
1515

1616
const getOutputElement = utils.getOutput(attribute);
17+
18+
if (color1.value == '' || color2.value == '') {
19+
if (color1.value == '') utils.triggerEmptyAnimation(color1);
20+
if (color2.value == '') utils.triggerEmptyAnimation(color2);
21+
return;
22+
}
1723
const resultPage = utils.getResultPage();
18-
24+
1925
resultPage.style.display = 'flex';
2026

2127
const values: Values = {

0 commit comments

Comments
 (0)