mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-30 01:42:29 +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;
|
|
}
|