Support toggle+widget buttons in plugin-framework

Change-Id: Ibf2b80efc1eeda2f51dedf4a7f3cd5ac67325ef9
diff --git a/dev/js/src/pipe.js b/dev/js/src/pipe.js
index f10853e..241b126 100644
--- a/dev/js/src/pipe.js
+++ b/dev/js/src/pipe.js
@@ -37,7 +37,7 @@
      */
     append : function (service) {
       service = _notNull(service);
-      if (service) {
+      if (service && this._pipe.indexOf(service) === -1) {
         this._pipe.push(service);
         this._update();
       };
@@ -49,7 +49,7 @@
      */
     prepend : function (service) {
       service = _notNull(service);
-      if (service) {
+      if (service && this._pipe.indexOf(service) === -1) {
         this._pipe.unshift(service);
         this._update();
       };