io service ES6 refactoring
This commit is contained in:
1 parent
c7cf73a6d1
commit
7594a14ad6
2 files changed
+6
-8
No files matched your search
@@ -1,15 +1,12 @@
|
||||
/**
|
||||
* Created by tmshv on 15/03/15.
|
||||
*/
|
||||
export default function (app) {
|
||||
let socket;
|
||||
|
||||
module.exports = function (app) {
|
||||
var socket;
|
||||
function init(){
|
||||
socket = io();
|
||||
}
|
||||
|
||||
app.service("io", function () {
|
||||
app.service('io', () => {
|
||||
if (!socket) init();
|
||||
return socket;
|
||||
});
|
||||
};
|
||||
};
|
||||
Reference in new issue
Block a user