Skip to content

Commit

Permalink
fix: lower case options added
Browse files Browse the repository at this point in the history
  • Loading branch information
yjb94 committed Jan 23, 2020
1 parent 18d422b commit 1819afa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 1819afa

Please sign in to comment.