From 58ee6c9f35a303db1a241f80e718d05444afca4c Mon Sep 17 00:00:00 2001 From: Cloyd Lau <31238760+cloydlau@users.noreply.github.com> Date: Tue, 13 Aug 2024 09:59:21 +0800 Subject: [PATCH] fix: axios data or params get dirty values --- src/api.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api.js b/src/api.js index e344a62..6a42a58 100644 --- a/src/api.js +++ b/src/api.js @@ -20,10 +20,10 @@ function configToCaller(axios, urlPrefix, config) { ? 'data' : 'params' if (payloadAs === 'data') { - configComputed.data ??= payload + configComputed.data = payload } else if (payloadAs === 'params') { - configComputed.params ??= payload + configComputed.params = payload } }