Limenius / ReactRenderer

Client and Server-side React rendering from PHP
MIT License
238 stars 37 forks source link

add compatibility with es5's strict mode #8

Closed artempetrovcode closed 7 years ago

artempetrovcode commented 7 years ago

The following code does not work in ES5's strict mode:

(function() {
  'use strict';
  reduxProps = {"models":[{}, {}]};
})();

The variables has to be declared before use:

(function() {
  'use strict';
  var reduxProps;
  reduxProps = {"models":[{}, {}]};
})();
nacmartin commented 7 years ago

Thanks @sttema !