File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -87,8 +87,10 @@ const IDEView = (props) => {
87
87
88
88
const autosaveIntervalRef = useRef ( null ) ;
89
89
90
+ const location = useLocation ( ) ;
91
+
90
92
const prevFileNameRef = useRef ( selectedFile . name ) ;
91
- const locationRef = useRef ( props . location ) ;
93
+ const locationRef = useRef ( location . pathname ) ;
92
94
93
95
const syncFileContent = ( ) => {
94
96
const file = cmRef . current . getContent ( ) ;
@@ -110,7 +112,7 @@ const IDEView = (props) => {
110
112
// for setting previous location
111
113
useEffect ( ( ) => {
112
114
dispatch ( setPreviousPath ( locationRef . current . pathname ) ) ;
113
- } , [ props . location ] ) ;
115
+ } , [ location . pathname ] ) ;
114
116
115
117
// For autosave
116
118
useEffect ( ( ) => {
@@ -273,9 +275,6 @@ IDEView.propTypes = {
273
275
project_id : PropTypes . string ,
274
276
username : PropTypes . string ,
275
277
reset_password_token : PropTypes . string
276
- } ) . isRequired ,
277
- location : PropTypes . shape ( {
278
- pathname : PropTypes . string
279
278
} ) . isRequired
280
279
} ;
281
280
You can’t perform that action at this time.
0 commit comments