Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1buzR2-0002pd-Ri for pgadmin-hackers@arkaria.postgresql.org; Fri, 14 Oct 2016 10:09:52 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1buzR2-0001yX-6I for pgadmin-hackers@arkaria.postgresql.org; Fri, 14 Oct 2016 10:09:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1buzQo-0001k8-V9 for pgadmin-hackers@postgresql.org; Fri, 14 Oct 2016 10:09:39 +0000 Received: from mail-qk0-x236.google.com ([2607:f8b0:400d:c09::236]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1buzQl-0003EK-Rt for pgadmin-hackers@postgresql.org; Fri, 14 Oct 2016 10:09:38 +0000 Received: by mail-qk0-x236.google.com with SMTP id z190so138913586qkc.2 for ; Fri, 14 Oct 2016 03:09:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=ggxjmp/LIEC3TPbzG0T5V9p2QGTuo8wQ8EpZqCNThXg=; b=UILbOPEqovRWFxJFE/zMhaFK9az+IeoCLEFg9UJrzK5WACjpfcAKm91DQwv7VdLI+c /9aL8HgvbQIj5P2QxoGsZ42F/HNeksmr1HeJW8WFZBxa08+5PWlrAlufzLStPc4kwrFj fjBw1S5ejAcDdT36yCTCxjLveILHz/U2GNhgv+OGCE8eUDWn02ocdg32OY3Got4xsEN7 0LidUz6uVHjzxYWrjh5nPSGzteHqPdupqPDb5olIdyG3Z/0f2cyeRIPMMa5KDar7T7xI OO3kRaLk+SdgjXKcJuK8Q1sjspKJGo1rnkpWRCq3SJStGhoTd/FfK8b2q09SpDWl5Luq iiuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=ggxjmp/LIEC3TPbzG0T5V9p2QGTuo8wQ8EpZqCNThXg=; b=TZagn4tUAwTY6ZULJIOU3B3LDKrWZwGVNHZjy+K8PNyVPC7fxSgdkzGEILnHsxMyMh 8K5PNUc1JOmYlIGjxTLek290caetw6bBxdZKAm2Qk/f0Dv8uHuAVB2lXMLyhej1lpeRJ aZi7wlx2sEFXYXOjXJCSSBX24Iud8XNy28qc5+pt62o5a8D39fraIixTgZO75mxqLn4u sPUSaVAm1KdaDqozpUTDImADys56FMYUh64zllFuX1+Xi+lBYwfbjr5lvzVGp6yII3mE /vxPQH3pISAZDsdL1F/A2LWoJXSgvqkEvFHnNTu5/9ZasaCxwzQyDz6kzHpNwEUGJiqs 0r+w== X-Gm-Message-State: AA6/9Rk6ESQhTPW+XgEwMsb4CqXHu20XjRDD+14vPaj5XHH5xSbr0ME2MvKdC7hmMdOBp7nb5DYQ6ZECviXEI9+k X-Received: by 10.194.20.231 with SMTP id q7mr1434535wje.57.1476439773612; Fri, 14 Oct 2016 03:09:33 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.172.198 with HTTP; Fri, 14 Oct 2016 03:09:02 -0700 (PDT) From: Surinder Kumar Date: Fri, 14 Oct 2016 15:39:02 +0530 Message-ID: Subject: [pgAdmin4][Patch]: Select2 control destroy issue [Minor fix] To: pgadmin-hackers Content-Type: multipart/mixed; boundary=047d7b4512083d7406053ed06ce9 X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgadmin-hackers Precedence: bulk Sender: pgadmin-hackers-owner@postgresql.org --047d7b4512083d7406053ed06ce9 Content-Type: multipart/alternative; boundary=047d7b4512083d7401053ed06ce7 --047d7b4512083d7401053ed06ce7 Content-Type: text/plain; charset=UTF-8 Hi While clicking on Select2 control, it tries to destroy the control and thus it doesn't get this object sometimes and throws error. It should attempt to destroy the select2 object only if this object is not undefined. Adds proper check to handle the case. Please find minor patch and review. Thanks Surinder Kumar --047d7b4512083d7401053ed06ce7 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi<= /div>

While clicking on Select2= control, it tries to destroy the control and thus it doesn't get this = object sometimes and throws error.

It should attempt to destroy the select2 object only if this obj= ect is not undefined.
Adds proper check to handle the case.

Please find minor patch and review.

Thanks
Surinder Kumar
--047d7b4512083d7401053ed06ce7-- --047d7b4512083d7406053ed06ce9 Content-Type: application/octet-stream; name="select2_control_destroy_issue.patch" Content-Disposition: attachment; filename="select2_control_destroy_issue.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_iu9m2nt80 ZGlmZiAtLWdpdCBhL3dlYi9wZ2FkbWluL3N0YXRpYy9qcy9iYWNrZm9ybS5w Z2FkbWluLmpzIGIvd2ViL3BnYWRtaW4vc3RhdGljL2pzL2JhY2tmb3JtLnBn YWRtaW4uanMKaW5kZXggMWQ5NmRlMC4uYjY4NWI2YyAxMDA2NDQKLS0tIGEv d2ViL3BnYWRtaW4vc3RhdGljL2pzL2JhY2tmb3JtLnBnYWRtaW4uanMKKysr IGIvd2ViL3BnYWRtaW4vc3RhdGljL2pzL2JhY2tmb3JtLnBnYWRtaW4uanMK QEAgLTE4OTQsNyArMTg5NCw3IEBACiAgICAgXS5qb2luKCJcbiIpKSwKICAg ICByZW5kZXI6IGZ1bmN0aW9uKCkgewogCi0gICAgICBpZih0aGlzLiRzZWwg JiYgdGhpcy4kc2VsLnNlbGVjdDIpIHsKKyAgICAgIGlmKHRoaXMgJiYgdGhp cy4kc2VsICYmIHRoaXMuJHNlbC5zZWxlY3QyKSB7CiAgICAgICAgIHRoaXMu JHNlbC5zZWxlY3QyKCdkZXN0cm95Jyk7CiAgICAgICB9CiAK --047d7b4512083d7406053ed06ce9 Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers --047d7b4512083d7406053ed06ce9--