diff --git a/client/views/admin/mailer/Mailer.js b/client/views/admin/mailer/Mailer.js index 16aa010da5b5..60f2babd3fdf 100644 --- a/client/views/admin/mailer/Mailer.js +++ b/client/views/admin/mailer/Mailer.js @@ -10,8 +10,8 @@ import { } from '@rocket.chat/fuselage'; import React, { useState, useCallback } from 'react'; -import { isJSON } from '../../../../app/utils/lib/isJSON'; import { isEmail } from '../../../../lib/utils/isEmail'; +import { isJSON } from '../../../../lib/utils/isJSON'; import Page from '../../../components/Page'; import { useTranslation } from '../../../contexts/TranslationContext'; diff --git a/app/utils/lib/isJSON.js b/lib/utils/isJSON.ts similarity index 57% rename from app/utils/lib/isJSON.js rename to lib/utils/isJSON.ts index ce5547a312b6..92820cd8c2d1 100644 --- a/app/utils/lib/isJSON.js +++ b/lib/utils/isJSON.ts @@ -1,4 +1,4 @@ -export const isJSON = (value) => { +export const isJSON = (value: string): boolean => { try { return !!JSON.parse(value); } catch {