Rename helper function to createNonClashingNameAsync

pull/5370/head
ioedeveloper 4 years ago
parent 1e6a044f0a
commit 84e2dc016b
  1. 2
      apps/remix-ide/src/lib/helper.js
  2. 2
      libs/remix-ui/file-explorer/src/lib/file-explorer.tsx

@ -50,7 +50,7 @@ module.exports = {
createNonClashingName (name, fileProvider, cb) {
this.createNonClashingNameWithPrefix(name, fileProvider, '', cb)
},
async checkNonClashingNameAsync (name, fileManager, prefix = '') {
async createNonClashingNameAsync (name, fileManager, prefix = '') {
if (!name) name = 'Undefined'
let counter = ''
let ext = 'sol'

@ -234,7 +234,7 @@ export const FileExplorer = (props: FileExplorerProps) => {
const fileManager = state.fileManager
try {
const newName = await helper.checkNonClashingNameAsync(newFilePath, fileManager)
const newName = await helper.createNonClashingNameAsync(newFilePath, fileManager)
const createFile = await fileManager.writeFile(newName, '')
if (!createFile) {

Loading…
Cancel
Save