Skip to content

Commit

Permalink
[fixed] A couple IE8 issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jquense committed Dec 6, 2015
1 parent 1ac723b commit 6e83098
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/Popup.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ module.exports = React.createClass({
, margin = parseInt(css(content, 'margin-top'), 10)
+ parseInt(css(content, 'margin-bottom'), 10);

var height = getHeight(content) + (isNaN(margin) ? 0 : margin )
var height = (getHeight(content) || 0) + (isNaN(margin) ? 0 : margin)

if( this.state.height !== height) {
el.style.height = height + 'px'
Expand Down
24 changes: 13 additions & 11 deletions src/util/localizers.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,16 +134,18 @@ export default { number, date }
function createWrapper(){
let dummy = {};

['formats', 'parse', 'format', 'firstOfWeek', 'precision']
.forEach(name => Object.defineProperty(dummy, name, {
enumerable: true,
get(){
throw new Error(
'[React Widgets] You are attempting to use a widget that requires localization ' +
'(Calendar, DateTimePicker, NumberPicker). ' +
'However there is no localizer set. Please configure a localizer. \n\n' +
'see http://jquense.github.io/react-widgets/docs/#/i18n for more info.')
}
}))
if (process.env.NODE_ENV !== 'production' ) {
['formats', 'parse', 'format', 'firstOfWeek', 'precision']
.forEach(name => Object.defineProperty(dummy, name, {
enumerable: true,
get(){
throw new Error(
'[React Widgets] You are attempting to use a widget that requires localization ' +
'(Calendar, DateTimePicker, NumberPicker). ' +
'However there is no localizer set. Please configure a localizer. \n\n' +
'see http://jquense.github.io/react-widgets/docs/#/i18n for more info.')
}
}))
}
return dummy
}

0 comments on commit 6e83098

Please sign in to comment.