From: Mike Taylor Date: Mon, 9 Mar 2015 17:13:43 +0000 (+0000) Subject: Cleaning up MKWS-58. X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=928e582912ca5fcddd5a8c70c559bb97d1acdbff;p=mkws-moved-to-github.git Cleaning up MKWS-58. Remove unnecessary named function setRecordData(), used only once. Just use a closure. --- diff --git a/src/mkws-widget-main.js b/src/mkws-widget-main.js index e264eba..3e7ec3d 100644 --- a/src/mkws-widget-main.js +++ b/src/mkws-widget-main.js @@ -149,14 +149,12 @@ mkws.registerWidgetType('records', function() { } var m_frozen = false; - function setRecordData(data) { + this.team.queue("records").subscribe(function(data) { m_dataToRedraw = data; if (!m_frozen) { refreshRecordData(); } - } - - this.team.queue("records").subscribe(setRecordData); + }); var m_timer; this.node.mousemove(function() {