Skip to content

Commit

Permalink
fix(www): use querySelector now that element is dynamically created
Browse files Browse the repository at this point in the history
  • Loading branch information
sbruens committed Oct 4, 2023
1 parent 64cf473 commit 7083ac2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/www/app/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export class App {
private quitApplication: () => void,
document = window.document
) {
this.feedbackViewEl = rootEl.$.feedbackView;
this.feedbackViewEl = rootEl.shadowRoot.querySelector('#feedbackView');

Check warning on line 102 in src/www/app/app.ts

View check run for this annotation

Codecov / codecov/patch

src/www/app/app.ts#L102

Added line #L102 was not covered by tests
this.localize = this.rootEl.localize.bind(this.rootEl);

this.syncServersToUI();
Expand Down Expand Up @@ -497,15 +497,15 @@ export class App {
return;
}
const {feedback, category, email} = formData;
this.rootEl.$.feedbackView.submitting = true;
this.feedbackViewEl.submitting = true;

Check warning on line 500 in src/www/app/app.ts

View check run for this annotation

Codecov / codecov/patch

src/www/app/app.ts#L500

Added line #L500 was not covered by tests
try {
await this.errorReporter.report(feedback, category, email);
this.rootEl.$.feedbackView.submitting = false;
this.rootEl.$.feedbackView.resetForm();
this.feedbackViewEl.submitting = false;
this.feedbackViewEl.resetForm();

Check warning on line 504 in src/www/app/app.ts

View check run for this annotation

Codecov / codecov/patch

src/www/app/app.ts#L503-L504

Added lines #L503 - L504 were not covered by tests
this.changeToDefaultPage();
this.rootEl.showToast(this.rootEl.localize('feedback-thanks'));
} catch (e) {
this.rootEl.$.feedbackView.submitting = false;
this.feedbackViewEl.submitting = false;
this.showLocalizedError(new errors.FeedbackSubmissionError());
}
}
Expand Down

0 comments on commit 7083ac2

Please sign in to comment.