@momo-kits/avatar 0.0.7 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/Avatar.js +2 -2
  2. package/package.json +1 -1
package/Avatar.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import PropTypes from 'prop-types';
3
3
  import React, { Component } from 'react';
4
4
  import {
5
- View, StyleSheet, TouchableOpacity, Dimensions
5
+ View, StyleSheet, TouchableOpacity, Dimensions, Platform
6
6
  } from 'react-native';
7
7
  import { get, isEqual } from 'lodash';
8
8
  import {
@@ -333,7 +333,7 @@ export default class Avatar extends Component {
333
333
  this.subscription = Dimensions.addEventListener(
334
334
  'change',
335
335
  ({ window }) => {
336
- if(window?.height > 0 && window?.width > 0) {
336
+ if(window?.height > 0 && window?.width > 0 && Platform.OS === 'android') {
337
337
  this.setState({ dimensions: window });
338
338
  }
339
339
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/avatar",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "private": false,
5
5
  "main": "index.js",
6
6
  "dependencies": {},