Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
grzegorz914 committed Dec 1, 2024
1 parent fd18009 commit 6d8e816
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';
import fs from 'fs';
import { join } from 'path';
import { mkdirSync } from 'fs';
import { mkdirSync, existsSync, writeFileSync } from 'fs';
import XboxDevice from './src/xboxdevice.js';
import ImpulseGenerator from './src/impulsegenerator.js';
import { PluginName, PlatformName } from './src/constants.js';
Expand Down Expand Up @@ -69,8 +68,8 @@ class XboxPlatform {
];

files.forEach((file) => {
if (!fs.existsSync(file)) {
fs.writeFileSync(file, '');
if (!existsSync(file)) {
writeFileSync(file, '');
}
});
} catch (error) {
Expand Down

0 comments on commit 6d8e816

Please sign in to comment.