Skip to content

Commit c57aa73

Browse files
committed
crate.version: Import only prerelease() function
1 parent da343f5 commit c57aa73

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/routes/crate/version.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { observer } from '@ember/object';
22
import Route from '@ember/routing/route';
33
import { inject as service } from '@ember/service';
4-
import semver from 'semver';
4+
import { prerelease } from 'semver';
55

66
import fetch from 'fetch';
77
import ajax from 'ember-fetch/ajax';
@@ -21,7 +21,7 @@ export default Route.extend({
2121
const controller = this.controllerFor(this.routeName);
2222
const maxVersion = crate.get('max_version');
2323

24-
const isUnstableVersion = version => !!semver.prerelease(version);
24+
const isUnstableVersion = version => !!prerelease(version);
2525

2626
const fetchCrateDocumentation = () => {
2727
if (!crate.get('documentation') || crate.get('documentation').substr(0, 16) === 'https://docs.rs/') {

0 commit comments

Comments
 (0)