From f6712384019c1ca167a78364628c55a03f000236 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Mon, 27 Jan 2014 07:39:27 -0500 Subject: [PATCH] refactor(socket, view) apply -> bind --- lib/client/socket.js | 4 +--- lib/client/view.js | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/client/socket.js b/lib/client/socket.js index 243aeddb..3c6754cd 100644 --- a/lib/client/socket.js +++ b/lib/client/socket.js @@ -7,9 +7,7 @@ var CloudCmd, Util, DOM, io; CloudCmd.Socket = SocketProto; function SocketProto(callback) { - var Socket = function () { - Util.exec.apply(null, arguments); - }, + var Socket = Util.exec.bind(Util), AllListeners = {}, socket, diff --git a/lib/client/view.js b/lib/client/view.js index b70dea4a..99575a8d 100644 --- a/lib/client/view.js +++ b/lib/client/view.js @@ -12,9 +12,7 @@ var CloudCmd, Util, DOM, CloudFunc, $; Info = DOM.CurrentInfo, Key = CloudCmd.Key, Images = DOM.Images, - View = function() { - Util.exec(arguments); - }, + View = Util.exec.bind(Util), Element, Config = {