Skip to content

Commit c22cb63

Browse files
authored
Merge pull request #236 from SparkPost/233-preview-draft
Fixing Template Preview draft option
2 parents a2f8eda + daff7fa commit c22cb63

File tree

3 files changed

+2425
-4
lines changed

3 files changed

+2425
-4
lines changed

lib/templates.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ module.exports = function(client) {
140140
, qs: {}
141141
};
142142

143-
if (reqOpts.json.draft) {
143+
// Add draft to query params
144+
if (reqOpts.json.hasOwnProperty('draft')) {
144145
reqOpts.qs.draft = reqOpts.json.draft;
145146
delete reqOpts.json.draft;
146147
}

0 commit comments

Comments
 (0)