mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 08:03:30 +02:00
Fix all res/ files with ESLint rules with 0 errors.
This commit is contained in:
@@ -11,17 +11,17 @@ module.exports = function SocketFactory(
|
||||
reconnection: false, transports: ['websocket']
|
||||
})
|
||||
|
||||
socket.scoped = function ($scope) {
|
||||
socket.scoped = function($scope) {
|
||||
var listeners = []
|
||||
|
||||
$scope.$on('$destroy', function () {
|
||||
listeners.forEach(function (listener) {
|
||||
$scope.$on('$destroy', function() {
|
||||
listeners.forEach(function(listener) {
|
||||
socket.removeListener(listener.event, listener.handler)
|
||||
})
|
||||
})
|
||||
|
||||
return {
|
||||
on: function (event, handler) {
|
||||
on: function(event, handler) {
|
||||
listeners.push({
|
||||
event: event, handler: handler
|
||||
})
|
||||
@@ -31,12 +31,12 @@ module.exports = function SocketFactory(
|
||||
}
|
||||
}
|
||||
|
||||
socket.on('outdated', function () {
|
||||
socket.on('outdated', function() {
|
||||
VersionUpdateService.open()
|
||||
})
|
||||
|
||||
socket.on('socket.ip', function (ip) {
|
||||
$rootScope.$apply(function () {
|
||||
socket.on('socket.ip', function(ip) {
|
||||
$rootScope.$apply(function() {
|
||||
socket.ip = ip
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user