Skip to content

Commit

Permalink
Merge pull request #18 from apostrophecms/hotfix/undeclared-var
Browse files Browse the repository at this point in the history
Specifies undeclared variable
  • Loading branch information
Alex Bea authored May 20, 2019
2 parents 4d1e3e2 + 352088e commit 47fba70
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 2.5.1

Fixes a bug in the `exclude-types` argument usage.

## 2.5.0

Added a configuration option to remove `siteMapPriority` field globally
Expand Down
10 changes: 6 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,6 @@ module.exports = {

var argv = self.apos.argv;

if (argv['exclude-types']) {
self.excludeTypes = excludeTypes.concat(argv['exclude-types'].split(','));
}

if (self.caching) {
self.cacheOutput = [];
}
Expand All @@ -93,7 +89,13 @@ module.exports = {
self.format = argv.format || options.format || 'xml';

self.indent = (typeof(argv.indent) !== 'undefined') ? argv.indent : options.indent;

self.excludeTypes = options.excludeTypes || [];

if (argv['exclude-types']) {
self.excludeTypes = self.excludeTypes.concat(argv['exclude-types'].split(','));
}

self.perLocale = options.perLocale || argv['per-locale'];
// Exception: plaintext sitemaps and sitemap indexes don't go
// together, so we can presume that if they explicitly ask
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "apostrophe-site-map",
"version": "2.5.1",
"version": "2.5.2",
"description": "Generate site maps for sites powered by the Apostrophe CMS.",
"main": "index.js",
"dependencies": {
Expand All @@ -19,7 +19,7 @@
},
"repository": {
"type": "git",
"url": "https://github.com/punkave/apostrophe-site-map"
"url": "https://github.com/apostrophecms/apostrophe-site-map"
},
"keywords": [
"sitemap",
Expand All @@ -33,7 +33,7 @@
"author": "P'unk Avenue LLC",
"license": "MIT",
"bugs": {
"url": "https://github.com/punkave/apostrophe-site-map/issues"
"url": "https://github.com/apostrophecms/apostrophe-site-map/issues"
},
"homepage": "https://github.com/punkave/apostrophe-site-map"
"homepage": "https://github.com/apostrophecms/apostrophe-site-map"
}

0 comments on commit 47fba70

Please sign in to comment.