Fix prettier nits

This commit is contained in:
Ricky Miller 2018-02-12 10:02:37 -06:00 committed by Jordan Eldredge
parent 94fc18fa27
commit cd8d38b371
3 changed files with 7 additions and 3 deletions

View file

@ -18,7 +18,10 @@ const MainContextMenu = props => (
<Hr />
<Node onClick={props.openFileDialog} label="Play File..." />
<Parent label="Skins">
<Node onClick={props.openFileDialog.bind(null, '.zip, .wsz')} label="Load Skin..." />
<Node
onClick={props.openFileDialog.bind(null, ".zip, .wsz")}
label="Load Skin..."
/>
{!!props.avaliableSkins.length && <Hr />}
{props.avaliableSkins.map(skin => (
<Node

View file

@ -33,7 +33,7 @@ export async function promptForFileReferences(accept) {
// Does this represent a memory leak somehow?
// Can this fail? Do we ever reject?
const fileInput = document.createElement("input");
if (accept) fileInput.setAttribute("accept", accept)
if (accept) fileInput.setAttribute("accept", accept);
fileInput.type = "file";
fileInput.multiple = true;
// Not entirely sure why this is needed, since the input

View file

@ -78,7 +78,8 @@ export const parseIni = text => {
let section, match;
return text.split(/[\r\n]+/g).reduce((data, line) => {
if ((match = line.match(PROPERTY_REGEX)) && section != null) {
data[section][match[1].trim().toLowerCase()] = match[2].replace(/("|')/, '');
const value = match[2].replace(/("|')/, "");
data[section][match[1].trim().toLowerCase()] = value;
} else if ((match = line.match(SECTION_REGEX))) {
section = match[1].trim().toLowerCase();
data[section] = {};