zhaoyongjie commented on a change in pull request #17698:
URL: https://github.com/apache/superset/pull/17698#discussion_r767079713



##########
File path: superset-frontend/packages/superset-ui-core/src/utils/random.ts
##########
@@ -16,15 +16,12 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-import seedrandom from 'seedrandom';
-
-let random = seedrandom('superset-ui');
+import _seedrandom from 'seedrandom';
 
 export function seed(seed: string) {
-  random = seedrandom(seed);
-  return random;
+  return _seedrandom(seed);
 }
 
 export function seedRandom() {
-  return random();
+  return _seedrandom('superset-ui')();

Review comment:
       minor refactor, to avoid duplicate names(seedrandom).




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to