Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: path object not checking theme props #6451

Merged
merged 2 commits into from
Sep 26, 2022

Conversation

BeksOmega
Copy link
Collaborator

The basics

  • I branched from develop
  • My pull request is against develop
  • My code follows the style guide
  • I ran npm run format and npm run lint

The details

Resolves

Somehow some type problem snuck into develop. This fixes them.

Proposed Changes

Makes sure that the geras path object checks for theme properties before it accesses them.

Behavior Before Change

No change in user-facing behavior.

Behavior After Change

No change in user-facing behavior.

Reason for Changes

We like the build to build.

Test Coverage

N/A

Documentation

N/A

Additional Information

N/A

@@ -90,6 +90,10 @@ export class PathObject extends BasePathObject {
override applyColour(block: BlockSvg) {
this.svgPathLight.style.display = '';
this.svgPathDark.style.display = '';
if (!this.style.colourTertiary) {
throw new Error(
'The renderer did not properly initialize the block style');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe specify colourTertiary/colourSecondary in the messages to make it easier to track down?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

@BeksOmega BeksOmega merged commit 893787b into google:develop Sep 26, 2022
@BeksOmega BeksOmega deleted the fix/themes-again branch October 4, 2022 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants