mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-20 07:28:08 +03:00
await uriHandler
This commit is contained in:
parent
29e042a88b
commit
3df8e145d5
@ -89,7 +89,7 @@ class URIHandlerRegistry {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
handleURI (uri) {
|
async handleURI (uri) {
|
||||||
const parsed = url.parse(uri, true)
|
const parsed = url.parse(uri, true)
|
||||||
const {protocol, slashes, auth, port, host} = parsed
|
const {protocol, slashes, auth, port, host} = parsed
|
||||||
if (protocol !== 'atom:' || slashes !== true || auth || port) {
|
if (protocol !== 'atom:' || slashes !== true || auth || port) {
|
||||||
@ -101,7 +101,7 @@ class URIHandlerRegistry {
|
|||||||
try {
|
try {
|
||||||
if (registration) {
|
if (registration) {
|
||||||
historyEntry.handled = true
|
historyEntry.handled = true
|
||||||
registration(parsed, uri)
|
await registration(parsed, uri)
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
this.history.unshift(historyEntry)
|
this.history.unshift(historyEntry)
|
||||||
|
Loading…
Reference in New Issue
Block a user