Unverified Commit 0aabc474 authored by yann300's avatar yann300 Committed by GitHub

Merge pull request #2007 from ethereum/fixToaster

Various fixes
parents 464a12a1 0a1bf379
...@@ -56,6 +56,12 @@ module.exports = (contract, fileManager, cb, swarmVerifiedPublishCallBack) => { ...@@ -56,6 +56,12 @@ module.exports = (contract, fileManager, cb, swarmVerifiedPublishCallBack) => {
}) })
}, () => { }, () => {
swarmVerifiedPublish(JSON.stringify(metadata), '', (error, result) => { swarmVerifiedPublish(JSON.stringify(metadata), '', (error, result) => {
if (!error && swarmVerifiedPublishCallBack) {
swarmVerifiedPublishCallBack({
content: contract.metadata,
hash: contract.metadataHash
})
}
uploaded.push({ uploaded.push({
content: contract.metadata, content: contract.metadata,
hash: contract.metadataHash, hash: contract.metadataHash,
......
...@@ -219,7 +219,9 @@ class Editor { ...@@ -219,7 +219,9 @@ class Editor {
*/ */
_getMode (path) { _getMode (path) {
let ext = path.indexOf('.') !== -1 ? /[^.]+/.exec(path) : null let ext = path.indexOf('.') !== -1 ? /[^.]+/.exec(path) : null
if (ext) ext = path.replace(ext[0] + '.', '') // we get <ext> if (ext) {
ext = path.replace(ext[0] + '.', '') // we get <ext>
} else ext = 'txt'
ext = ext.split('#') ext = ext.split('#')
if (!ext.length) return this.modes['txt'] if (!ext.length) return this.modes['txt']
ext = ext[0] ext = ext[0]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment