Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Framework: ES Modules + Tree Shaking #16057

Merged
merged 10 commits into from
Jan 24, 2018
Prev Previous commit
simplify getPagePath
  • Loading branch information
samouri committed Jan 24, 2018
commit 819a9ce48e36c9014e06ccfd3acc24cae3887796
5 changes: 2 additions & 3 deletions client/lib/posts/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import url from 'url';
import i18n from 'i18n-calypso';
import moment from 'moment-timezone';
import { includes, get } from 'lodash';
import { includes } from 'lodash';

/**
* Internal dependencies
Expand Down Expand Up @@ -205,8 +205,7 @@ export const getPagePath = function( post ) {
return getPermalinkBasePath( post );
}

const postUrl = get( post, [ 'other_URLs', 'permalink_URL' ] ) || post.URL;
return removeSlug( postUrl );
return removeSlug( post.URL );
};

/**
Expand Down