react-native-component / react-native-smart-sortable-sudoku-grid

A smart sortable sudoku grid for React Native apps
MIT License
107 stars 42 forks source link

一个BUG #20

Open xiongxiong opened 7 years ago

xiongxiong commented 7 years ago

SortableSudokuGrid.js

line 150: newState.containerHeight = this.createHeight(nextProps)

如果前面两个条件都不满足的话,这里newState可能为undefined,我在首页使用该控件时出现了这个问题。是否应该改作: if (newState) { newState.containerHeight = this.createHeight(nextProps) } ???

suhabaobaid commented 6 years ago

@xiongxiong Have you found any fix for this bug?

xiongxiong commented 6 years ago

@suhabaobaid Change the file SortableSudokuGrid.js at line 150, to: if (newState) { newState.containerHeight = this.createHeight(nextProps) }

suhabaobaid commented 6 years ago

@xiongxiong Thanks! That was my initial fix...I was hoping for one not to meddle with the node_modules

xiongxiong commented 6 years ago

@suhabaobaid You can fork the project, and publish it with another name, then change the dependency to your project, else your changes in node_modules will be drop when you update dependencies.