mirror of
https://github.com/tenrok/vue-native-websocket.git
synced 2026-05-17 04:59:37 +03:00
release 10
This commit is contained in:
@@ -2,6 +2,11 @@
|
||||
|
||||
This package is [semantic versioned](http://semver.org/)
|
||||
|
||||
## 2.0.10
|
||||
- [bugfix]: check Proxy for old browsers. tnx [@mikhailian](https://github.com/mikhailian)
|
||||
- [feature]: Handle skip scheme ws url. tnx [@denzow](https://github.com/denzow)
|
||||
- [feature]: Support for custom mutation name. thx [@OmgImAlexis](https://github.com/OmgImAlexis)
|
||||
|
||||
## 2.0.9
|
||||
- [bugfix]: fixed reconnection
|
||||
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Generated
+7638
File diff suppressed because it is too large
Load Diff
+6
-4
@@ -3,10 +3,12 @@ import Emitter from './Emitter'
|
||||
export default class {
|
||||
constructor (connectionUrl, opts = {}) {
|
||||
this.format = opts.format && opts.format.toLowerCase()
|
||||
if(connectionUrl.startsWith('//')){
|
||||
const scheme = window.location.protocol === 'https:' ? 'wss' : 'ws';
|
||||
|
||||
if (connectionUrl.startsWith('//')) {
|
||||
const scheme = window.location.protocol === 'https:' ? 'wss' : 'ws'
|
||||
connectionUrl = `${scheme}://${connectionUrl}`
|
||||
}
|
||||
|
||||
this.connectionUrl = connectionUrl
|
||||
this.opts = opts
|
||||
|
||||
@@ -93,9 +95,9 @@ export default class {
|
||||
}
|
||||
}
|
||||
if (this.mutations) {
|
||||
this.store[this.mutations[method] || method](target, msg)
|
||||
this.store[this.mutations[method] || method](target, msg)
|
||||
} else {
|
||||
this.store[method](target, msg)
|
||||
this.store[method](target, msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user