Skip to content

Commit

Permalink
Fix issues with qs library.
Browse files Browse the repository at this point in the history
  • Loading branch information
vaibhavpandeyvpz committed Dec 12, 2021
1 parent 93912bf commit 6b9d405
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion src/index.html
Expand Up @@ -21,7 +21,6 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/filesize/8.0.6/filesize.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/blueimp-md5/2.19.0/js/md5.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.1/moment.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/qs/6.10.2/qs.min.js"></script>
<script src="script.js" type="module"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion src/react/utilities.js
Expand Up @@ -9,7 +9,7 @@ export const RPC_URL = process.env.RPC_URL || '';
export function sendAndReceive(action, data, config = {}) {
const headers = {'Content-Type': 'application/x-www-form-urlencoded'};
if (!data?.append) {
data = qs.stringify(data || {});
data = new URLSearchParams(data || {});
}

return axios.post(RPC_URL, data, {headers, params: {action}, ...config})
Expand Down

0 comments on commit 6b9d405

Please sign in to comment.