OSDN Git Service

prevent change item when show raw json
authorYongfeng LI <wliyongfeng@gmail.com>
Fri, 29 Dec 2017 03:11:44 +0000 (11:11 +0800)
committerYongfeng LI <wliyongfeng@gmail.com>
Fri, 29 Dec 2017 03:11:44 +0000 (11:11 +0800)
src/features/shared/components/RawJsonButton.jsx

index 07379ab..9ef5bea 100644 (file)
@@ -3,7 +3,7 @@ import { Connection } from 'sdk'
 
 class RawJsonButton extends React.Component {
   showRawJson(item){
-    const snakeCased = Connection.snakeize(item)
+    const snakeCased = Connection.snakeize({...item})
     this.props.showJsonModal(<pre>{JSON.stringify(snakeCased, null, 2)}</pre>)
   }