From 1d08a0eec60de18604b81bd939aeff7bf2d83d8e Mon Sep 17 00:00:00 2001 From: bill bittner Date: Fri, 28 Jul 2017 21:06:33 -0700 Subject: [PATCH] updated license drop down and comparison --- helpers/functions/isFreePublicClaim.js | 6 ++---- views/partials/publish.handlebars | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/helpers/functions/isFreePublicClaim.js b/helpers/functions/isFreePublicClaim.js index d8e15894..c58dccee 100644 --- a/helpers/functions/isFreePublicClaim.js +++ b/helpers/functions/isFreePublicClaim.js @@ -1,11 +1,9 @@ const logger = require('winston'); const licenses = ['Creative Commons', 'Public Domain', 'CC Attribution-NonCommercial 4.0 International']; + module.exports = ({ value }) => { logger.debug('checking isFreePublicClaim ?'); - if ( - (Array.asList(licenses).contains(value.stream.metadata.license)) && - (!value.stream.metadata.fee || value.stream.metadata.fee.amount === 0) - ) { + if ((licenses.includes(value.stream.metadata.license)) && (!value.stream.metadata.fee || value.stream.metadata.fee.amount === 0)) { return true; } else { return false; diff --git a/views/partials/publish.handlebars b/views/partials/publish.handlebars index 1a083f34..a8d7b2ed 100644 --- a/views/partials/publish.handlebars +++ b/views/partials/publish.handlebars @@ -18,9 +18,9 @@