Skip to content

Commit bae3af1

Browse files
committed
simplify regex per review feedback: (?:emfs|file)::\/\/ to avoid repetition
1 parent 7194ad7 commit bae3af1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

esm/interpreter/pyodide.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export default {
9999
// or URLs ending in .whl. When local wheels are present, disable IndexedDB
100100
// caching unless the user explicitly sets packages_cache = "all".
101101
// See https://github.com/pyscript/pyscript/issues/2282
102-
if (packages && packages.some(pkg => /^(?:\.{1,2}\/|\/|emfs:\/\/|file:\/\/)/.test(pkg) || /\.whl(?:\?|$)/.test(pkg))) {
102+
if (packages && packages.some(pkg => /^(?:\.{1,2}\/|\/|(?:emfs|file):\/\/)/.test(pkg) || /\.whl(?:\?|$)/.test(pkg))) {
103103
if (config.packages_cache !== 'all') {
104104
config.packages_cache = 'never';
105105
}

0 commit comments

Comments
 (0)