You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by bz...@apache.org on 2016/11/30 03:37:41 UTC

zeppelin git commit: remove usage of non-standard string method

Repository: zeppelin
Updated Branches:
  refs/heads/master c4e7fabf0 -> 97cdfa987


remove usage of non-standard string method

### What is this PR for?
This PR removes a non-standard string prototype method `contains` that can cause potential bugs in the future maintenance.

### What type of PR is it?
Bug Fix

### Todos
* [x] - remove usage of non-standard string method `contains` in favor of standard `indexOf`

### How should this be tested?
Download as `csv / tsv` (graph view) should work as expected

Author: felizbear <il...@nflabs.com>

Closes #1701 from felizbear/front-end-do-not-modify-protoypes-please and squashes the following commits:

ae9820e [felizbear] remove usage of non-standard string method


Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/97cdfa98
Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/97cdfa98
Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/97cdfa98

Branch: refs/heads/master
Commit: 97cdfa987ea415bcff3888bd61363e2daeda2e2b
Parents: c4e7fab
Author: felizbear <il...@nflabs.com>
Authored: Tue Nov 29 18:37:02 2016 +0900
Committer: Alexander Bezzubov <bz...@apache.org>
Committed: Wed Nov 30 12:36:55 2016 +0900

----------------------------------------------------------------------
 zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/97cdfa98/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
index 6f4dccd..c1ad35e 100644
--- a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
+++ b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
@@ -1338,7 +1338,7 @@
         var dsvRow = '';
         for (var index in row) {
           var stringValue =  (row[index]).toString();
-          if (stringValue.contains(delimiter)) {
+          if (stringValue.indexOf(delimiter) > -1) {
             dsvRow += '"' + stringValue + '"' + delimiter;
           } else {
             dsvRow += row[index] + delimiter;