Skip to content

Commit

Permalink
Merge pull request #2007 from ethereum/fixToaster
Browse files Browse the repository at this point in the history
Various fixes
  • Loading branch information
yann300 authored May 21, 2019
2 parents 464a12a + 0a1bf37 commit 0aabc47
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/app/contract/publishOnSwarm.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ module.exports = (contract, fileManager, cb, swarmVerifiedPublishCallBack) => {
})
}, () => {
swarmVerifiedPublish(JSON.stringify(metadata), '', (error, result) => {
if (!error && swarmVerifiedPublishCallBack) {
swarmVerifiedPublishCallBack({
content: contract.metadata,
hash: contract.metadataHash
})
}
uploaded.push({
content: contract.metadata,
hash: contract.metadataHash,
Expand Down
4 changes: 3 additions & 1 deletion src/app/editor/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,9 @@ class Editor {
*/
_getMode (path) {
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('#')
if (!ext.length) return this.modes['txt']
ext = ext[0]
Expand Down

0 comments on commit 0aabc47

Please sign in to comment.