@dhyasama/totem-models 3.4.1 → 3.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1333,12 +1333,17 @@ module.exports = function(mongoose, config) {
1333
1333
  var cleanWebsites = function cleanWebsites() {
1334
1334
 
1335
1335
  // Format website
1336
- if (self.website) self.website = utils.getDomain(self.website);
1336
+ if (self.website) {
1337
+ self.website = utils.getDomain(self.website);
1338
+ self.website = self.website.replace('http://', '').replace('https://', '');
1339
+ }
1337
1340
 
1338
1341
  // Format website aliases
1339
1342
  if (self.websiteAliases && self.websiteAliases.length >= 1) {
1340
1343
  self.websiteAliases = _.map(self.websiteAliases, function(alias) {
1341
- return utils.getDomain(alias);
1344
+ var website = utils.getDomain(alias);
1345
+ website = website.replace('http://', '').replace('https://', '');
1346
+ return utils.getDomain(website);
1342
1347
  });
1343
1348
  }
1344
1349
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "3.4.1",
3
+ "version": "3.4.2",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",