Ghost/ghost/admin/app/utils/slug-url.js

11 lines
216 B
JavaScript
Raw Permalink Normal View History

import {isBlank} from '@ember/utils';
export default function SlugUrl(url, query) {
if (query && !isBlank(query.slug)) {
url += `slug/${query.slug}/`;
delete query.slug;
}
return url;
}