Pārlūkot izejas kodu

Merge pull request #234 from jefflewis/fix-next-props

Fix next props call
Gaëtan Renaudeau 4 gadus atpakaļ
vecāks
revīzija
b26b973d18
No account linked to committer's email address
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2
    2
      src/index.js

+ 2
- 2
src/index.js Parādīt failu

255
 
255
 
256
   static getDerivedStateFromProps(props, state) {
256
   static getDerivedStateFromProps(props, state) {
257
     if(props.captureMode !== undefined) {
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
     return null;
262
     return null;