fresh-standard / fresh-themes

Multiformat themes and skins for your technical résumé/CV.
MIT License
194 stars 63 forks source link

Awesome: allow undefined speaking highlights. #61

Open ben-e-whitney opened 5 years ago

ben-e-whitney commented 5 years ago

Suppose a file test.json contains the following.

{
    "name": "Julia Child",

    "meta": {
        "format": "FRESH@0.1.0"
    },

    "info": {},

    "contact": {},

    "location": {},

    "speaking": [
        {
            "title": "How to Make Pancakes",
            "event": "Pancake Breakfast 2018"
        }
    ]
}

Building fails due to an assumption that speaking engagements have highlights (not mandated by the FRESH schema).

$ hackmyresume --version

*** HackMyResume v1.8.0 ***
1.8.0
$ hackmyresume VALIDATE test.json 

*** HackMyResume v1.8.0 ***
Validating test.json against the FRESH schema: VALID!
$ hackmyresume BUILD test.json TO test.latex --theme fresh-themes/themes/awesome

*** HackMyResume v1.8.0 ***
Reading FRESH resume: test.json
Applying AWESOME theme (3 formats)
Generating LATEX resume: test.latex
An error occurred during template invocation.
   TypeError: Cannot read property 'map' of undefined

This commit fixes the issue.