Skip to content
This repository has been archived by the owner on Jun 4, 2020. It is now read-only.

"Theme returned an error" #9

Closed
JaredCubilla opened this issue Jul 25, 2014 · 6 comments
Closed

"Theme returned an error" #9

JaredCubilla opened this issue Jul 25, 2014 · 6 comments

Comments

@JaredCubilla
Copy link

Hey, I just developed a theme. It looks great on the theme registry and locally, but when I try it on the sample Thomas Davis resume, all that is on the page is "Theme returned an error".

Is it that my theme is outdated? Or perhaps, it simply takes time?

@thomasdavis
Copy link
Member

Hey @JaredCubilla

Looks good! -> http://themes.jsonresume.org/theme/classy

I imagine, something is different about my resume.json that your theme is having trouble with.

@thomasdavis
Copy link
Member

It's working for other people -> http://registry.jsonresume.org/rolandsharp?theme=classy

@erming
Copy link
Contributor

erming commented Jul 25, 2014

I just added better error reporting:
http://registry.jsonresume.org/thomasdavis?theme=classy

@JaredCubilla
Copy link
Author

Awesome, thank you. It seems as if I need to update my index.js for null fields.

@erming
Copy link
Contributor

erming commented Jul 25, 2014

@JaredCubilla

Here's a good way to solve these issues:

w.startDateYear = (w.startDate || "").substr(0,4);

It's using the || operator.
If the left value is undefined or false the right value will be used instead.

@JaredCubilla
Copy link
Author

Thank you @erming. I'll be replacing all instances of that error with now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants