Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
p2p
go-ws-transport
Commits
df1ae121
Commit
df1ae121
authored
Oct 15, 2020
by
M. Hawn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update for go 1.14 Wasm changes
parent
9224b954
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
conn_browser.go
conn_browser.go
+3
-3
No files found.
conn_browser.go
View file @
df1ae121
...
...
@@ -272,17 +272,17 @@ func arrayBufferToBytes(buffer js.Value) []byte {
func
errorEventToError
(
val
js
.
Value
)
error
{
var
typ
string
if
gotType
:=
val
.
Get
(
"type"
);
gotType
!=
js
.
Undefined
()
{
if
gotType
:=
val
.
Get
(
"type"
);
!
gotType
.
Equal
(
js
.
Undefined
()
)
{
typ
=
gotType
.
String
()
}
else
{
typ
=
val
.
Type
()
.
String
()
}
var
reason
string
if
gotReason
:=
val
.
Get
(
"reason"
);
gotReason
!=
js
.
Undefined
()
&&
gotReason
.
String
()
!=
""
{
if
gotReason
:=
val
.
Get
(
"reason"
);
!
gotReason
.
Equal
(
js
.
Undefined
()
)
&&
gotReason
.
String
()
!=
""
{
reason
=
gotReason
.
String
()
}
else
{
code
:=
val
.
Get
(
"code"
)
if
code
!=
js
.
Undefined
()
{
if
!
code
.
Equal
(
js
.
Undefined
()
)
{
switch
code
:=
code
.
Int
();
code
{
case
1006
:
reason
=
"code 1006: connection unexpectedly closed"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment