From 1819afa5d5fb33d5aa777e98ca07415732c32849 Mon Sep 17 00:00:00 2001 From: yjb94 Date: Thu, 23 Jan 2020 13:44:12 +0900 Subject: [PATCH] fix: lower case options added --- src/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index 42a411c..475ae90 100644 --- a/src/index.js +++ b/src/index.js @@ -3,11 +3,11 @@ import React, { useEffect, useState } from 'react'; const ReactStoreBadges = ({ url, platform, - locale = (typeof navigator !== 'undefined' && navigator.language || 'en-us').toLowerCase(), + locale = (typeof navigator !== 'undefined' && navigator.language || 'en-us'), width = 135, height = 40, }) => { - let shortCode = locale; + let shortCode = locale = locale.toLowerCase() const expeptionLocale = ["zh-cn", "zh-tw"]; if (expeptionLocale.indexOf(locale) === -1) { shortCode = locale.split(/[_-]/)[0];