Skip to content

Commit 192c3d3

Browse files
committed
Repo: check for licenses before looping over them
Fixes gh-83 Close gh-85
1 parent 3f443a1 commit 192c3d3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/repo.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,11 @@ Release.define({
210210
console.log( "Updating package.json URLs..." );
211211
json = Release.readPackage();
212212
json.author.url = json.author.url.replace( "master", Release.newVersion );
213-
json.licenses.forEach(function( license ) {
214-
license.url = license.url.replace( "master", Release.newVersion );
215-
});
213+
if ( json.licenses ) {
214+
json.licenses.forEach(function( license ) {
215+
license.url = license.url.replace( "master", Release.newVersion );
216+
});
217+
}
216218
Release.writePackage( json );
217219

218220
Release.generateArtifacts(function( paths ) {

0 commit comments

Comments
 (0)