You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by devgeeks <gi...@git.apache.org> on 2017/09/21 21:38:38 UTC

[GitHub] cordova-docs pull request #733: CB-13305: Docs can't build because of ES6 co...

GitHub user devgeeks opened a pull request:

    https://github.com/apache/cordova-docs/pull/733

    CB-13305: Docs can't build because of ES6 code use

    <!--
    Please make sure the checklist boxes are all checked before submitting the PR. The checklist
    is intended as a quick reference, for complete details please see our Contributor Guidelines:
    
    http://cordova.apache.org/contribute/contribute_guidelines.html
    
    Thanks!
    -->
    
    ### Platforms affected
    Docs
    
    ### What does this PR do?
    Updated `linkRef` function to use `var` and ES5 functions instead of
    `let` and arrow functions.
    
    ### What testing has been done on this change?
    Manual as well as: `gulp build --pros`
    
    ### Checklist
    - [x] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database
    - [x] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected.
    - [ ] Added automated test coverage as appropriate for this change.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/devgeeks/cordova-docs CB-13305

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-docs/pull/733.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #733
    
----
commit 31bd4d3ade96ede755703eab555d59dd869e37ff
Author: tommy-carlos williams <to...@devgeeks.org>
Date:   2017-09-21T21:35:19Z

    CB-13305: Docs can't build because of ES6 code use
    
    Updated `linkRef` function to use `var` and ES5 functions instead of
    `let` and arrow functions.

----


---

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] cordova-docs pull request #733: CB-13305: Docs can't build because of ES6 co...

Posted by devgeeks <gi...@git.apache.org>.
Github user devgeeks commented on a diff in the pull request:

    https://github.com/apache/cordova-docs/pull/733#discussion_r140390069
  
    --- Diff: www/static/plugins/searchbar.jsx ---
    @@ -8,9 +8,9 @@ var SearchBar = createClass({
     
         // polyfill of sorts for string refs
         linkRef: function(component, name) {
    -        let cache = component._linkedRefs || (component._linkedRefs = {});
    +        var cache = component._linkedRefs || (component._linkedRefs = {});
             if (!component.refs) component.refs = {};
    -        return cache[name] || (cache[name] = c => {
    +        return cache[name] || (cache[name] = function(c) {
                 component.refs[name] = c;
    --- End diff --
    
    Ah hah. Good catch. Arrow functions have implicit returns. 


---

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] cordova-docs pull request #733: CB-13305: Docs can't build because of ES6 co...

Posted by shazron <gi...@git.apache.org>.
Github user shazron commented on a diff in the pull request:

    https://github.com/apache/cordova-docs/pull/733#discussion_r140389784
  
    --- Diff: www/static/plugins/searchbar.jsx ---
    @@ -8,9 +8,9 @@ var SearchBar = createClass({
     
         // polyfill of sorts for string refs
         linkRef: function(component, name) {
    -        let cache = component._linkedRefs || (component._linkedRefs = {});
    +        var cache = component._linkedRefs || (component._linkedRefs = {});
             if (!component.refs) component.refs = {};
    -        return cache[name] || (cache[name] = c => {
    +        return cache[name] || (cache[name] = function(c) {
                 component.refs[name] = c;
    --- End diff --
    
    Or is the cache caching a function? (I'm going by what arrow functions typically do)


---

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] cordova-docs pull request #733: CB-13305: Docs can't build because of ES6 co...

Posted by shazron <gi...@git.apache.org>.
Github user shazron commented on a diff in the pull request:

    https://github.com/apache/cordova-docs/pull/733#discussion_r140389704
  
    --- Diff: www/static/plugins/searchbar.jsx ---
    @@ -8,9 +8,9 @@ var SearchBar = createClass({
     
         // polyfill of sorts for string refs
         linkRef: function(component, name) {
    -        let cache = component._linkedRefs || (component._linkedRefs = {});
    +        var cache = component._linkedRefs || (component._linkedRefs = {});
             if (!component.refs) component.refs = {};
    -        return cache[name] || (cache[name] = c => {
    +        return cache[name] || (cache[name] = function(c) {
                 component.refs[name] = c;
    --- End diff --
    
    should this be:
    `return component.refs[name] = c;` ? if not the assignment doesn't make sense


---

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] cordova-docs pull request #733: CB-13305: Docs can't build because of ES6 co...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/cordova-docs/pull/733


---

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org