From 5476c293228489510c90043be2266c7d6a26d4ab Mon Sep 17 00:00:00 2001 From: Alex Liebowitz Date: Wed, 21 Sep 2016 02:57:20 -0400 Subject: [PATCH] Fix handling of absent license URLs Before, if an option was picked that has no license URL field, it would submit undefined for license_url. Now it correctly omits the key. --- js/page/publish.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/page/publish.js b/js/page/publish.js index 4ca9d81b0..664cf72da 100644 --- a/js/page/publish.js +++ b/js/page/publish.js @@ -287,7 +287,7 @@ var PublishPage = React.createClass({ } else if (this.state.otherLicenseChosen) { return this.state.otherLicenseUrl; } else { - return this.refs.meta_license.getSelectedElement().getAttribute('data-url'); + return this.refs.meta_license.getSelectedElement().getAttribute('data-url') || '' ; } }, componentDidMount: function() {