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/undefined versions #43

Closed
wants to merge 3 commits into from
Closed

Fix/undefined versions #43

wants to merge 3 commits into from

Conversation

morreman
Copy link
Member

@morreman morreman commented Jul 17, 2020

Since silentSyncLoadJsonFile() can return undefined we should(?) nullguard the versions variable.
From what I understand it should be ok for the versions variable to be undefined.

// It's okay for it not to exist

We have some repos whos travis builds is failing on this

Failed to init systems: TypeError: Cannot read property 'files' of undefined

For example when running mocha on Jalla

at AssetVersions._loadAssetDefinitions (/home/runner/work/jalla/jalla/node_modules/@hdsydsvenskan/asset-versions/index.js:55:36)

// Side-note the build-script won't finnish if one is missing the dist/rev dist/bare folders. I changed the gitIgnore but you might want to do it a different way? I see that its been failaing on this for a while so I revert my ignore edit

@morreman morreman requested a review from voxpelli July 17, 2020 11:35
@voxpelli voxpelli closed this in 8a51f1b Jul 20, 2020
@voxpelli voxpelli deleted the fix/undefined-versions branch July 20, 2020 15:03
@voxpelli
Copy link
Contributor

@morreman I made a slightly different and deeper fix than this, ensuring that the data read is actually valid all the way through. Thanks for pointing it all out!

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.

2 participants