Chore: Move isJSON helper (#23491)

pull/23001/head
Tasso Evangelista 4 years ago committed by GitHub
parent 3f2496af41
commit b50e38d7e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      client/views/admin/mailer/Mailer.js
  2. 2
      lib/utils/isJSON.ts

@ -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';

@ -1,4 +1,4 @@
export const isJSON = (value) => {
export const isJSON = (value: string): boolean => {
try {
return !!JSON.parse(value);
} catch {
Loading…
Cancel
Save