Skip to content

Commit

Permalink
Removed unneeded Promise.resolve
Browse files Browse the repository at this point in the history
no issue

- was not removed during url service cleanup
- the function runs synchronously
- has no impact on functionality
  • Loading branch information
kirrg001 committed Apr 17, 2018
1 parent 79c790c commit f9ffc39
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions core/server/services/url/UrlGenerator.js
@@ -1,7 +1,6 @@
'use strict';

const _ = require('lodash'),
Promise = require('bluebird'),
moment = require('moment-timezone'),
jsonpath = require('jsonpath'),
debug = require('ghost-ignition').debug('services:url:generator'),
Expand Down Expand Up @@ -89,7 +88,7 @@ class UrlGenerator {

// CASE: you are type "pages", but the incoming type is "users"
if (event.type !== this.routingType.getType()) {
return Promise.resolve();
return;
}

const resource = this.resources.getByIdAndType(event.type, event.id);
Expand Down

0 comments on commit f9ffc39

Please sign in to comment.