uuid() と lint (#5288)

* Import only v4 uuid, uuid() without version is deprecated

* Add Missing semicolon
This commit is contained in:
Satsuki Yanagi
2019-08-18 12:42:58 +09:00
committed by syuilo
parent 6060c6d56e
commit 59493a0cd9
21 changed files with 37 additions and 37 deletions

View File

@@ -1,11 +1,11 @@
import config from '../../../config';
import * as uuid from 'uuid';
import { v4 as uuid } from 'uuid';
export const renderActivity = (x: any) => {
if (x == null) return null;
if (x !== null && typeof x === 'object' && x.id == null) {
x.id = `${config.url}/${uuid.v4()}`;
x.id = `${config.url}/${uuid()}`;
}
return Object.assign({