news-catalyst / google-app-scripts

a collection of scripts for tinynews google docs add-ons
https://script.google.com/a/newscatalyst.org/d/1ILURq69o3cYUy6k1n1X6HwxdMfl9xWNhILYuZxgLfeblb3IR15WCMZSj/edit
1 stars 1 forks source link

form validation check on publish/republish had incorrect parens #299

Closed jacqui closed 3 years ago

jacqui commented 3 years ago

Fixes #287

Rookie error: incorrect parenthetical grouping on the publish/republish form validity check meant invalid forms were passing through to pub/repub. Some noise in this PR as I cleaned up/commented out a bunch of console logs, but the only significant change was the grouping here from:

        } else if ( formIsValid && (formObject.submitted === "Publish") || (formObject.submitted === "Re-publish") ) {

to:

        } else if ( formIsValid && (formObject.submitted === "Publish" || formObject.submitted === "Re-publish") ) {

Test in script editor with latest code; once this is merged, add-on will have to be reversioned & republished.