cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From devgeeks <...@git.apache.org>
Subject [GitHub] cordova-docs pull request #733: CB-13305: Docs can't build because of ES6 co...
Date Fri, 22 Sep 2017 00:28:08 GMT
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


Mime
View raw message