diff --git a/node_modules/ahooks/es/useTextSelection/index.js b/node_modules/ahooks/es/useTextSelection/index.js
index 8ffa296..6f568fb 100644
--- a/node_modules/ahooks/es/useTextSelection/index.js
+++ b/node_modules/ahooks/es/useTextSelection/index.js
@@ -126,7 +126,7 @@ function useTextSelection(target) {
 
       var selObj = window.getSelection();
       if (!selObj) return;
-      selObj.removeAllRanges();
+      selObj.toString() && selObj.removeAllRanges();
     };
 
     el.addEventListener('mouseup', mouseupHandler);
