Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Change isUndefined to !== undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
Palid committed Aug 6, 2021
1 parent b5f3e83 commit 27b8ab9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/languageHandler.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import PlatformPeg from "./PlatformPeg";
import webpackLangJsonUrl from "$webapp/i18n/languages.json";
import { SettingLevel } from "./settings/SettingLevel";
import { retry } from "./utils/promise";
import { isUndefined } from 'lodash';

const i18nFolder = 'i18n/';

Expand Down Expand Up @@ -189,8 +188,8 @@ export function substitute(text: string, variables: IVariables, tags: Tags): str
export function substitute(text: string, variables?: IVariables, tags?: Tags): string | React.ReactNode {
let result: React.ReactNode | string = text;

const hasVariables = !isUndefined(variables);
const hasTags = !isUndefined(tags);
const hasVariables = variables !== undefined;
const hasTags = tags !== undefined;
const mappingVariables: IVariables = {};
/**
* All three arguments is a very niche feature in this application, and needs special treatment.
Expand Down

0 comments on commit 27b8ab9

Please sign in to comment.