mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 14:03:48 +03:00
fdc24103cc
no issue * ran native classes codemod for app/adapters * migrated slug-url mixin to a utility
11 lines
216 B
JavaScript
11 lines
216 B
JavaScript
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;
|
|
}
|