浏览代码

Fix next props call

Jeff Lewis 4 年前
父节点
当前提交
290ae63c1b
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2
    2
      src/index.js

+ 2
- 2
src/index.js 查看文件

@@ -255,8 +255,8 @@ export default class ViewShot extends Component<Props> {
255 255
 
256 256
   static getDerivedStateFromProps(props, state) {
257 257
     if(props.captureMode !== undefined) {
258
-      if (nextProps.captureMode !== this.props.captureMode) {
259
-        this.syncCaptureLoop(nextProps.captureMode);
258
+      if (props.captureMode !== this.props.captureMode) {
259
+        this.syncCaptureLoop(props.captureMode);
260 260
       }
261 261
     }
262 262
     return null;