Explorar o código

chore(compiler-sfc): replace `substr` with `slice` (#12564)

webfansplz %!s(int64=3) %!d(string=hai) anos
pai
achega
6f0d2e6985

+ 1 - 1
packages/compiler-sfc/src/templateCompilerModules/srcset.ts

@@ -38,7 +38,7 @@ function transform(
         }
 
         const imageCandidates: ImageCandidate[] = value
-          .substr(1, value.length - 2)
+          .slice(1, -1)
           .split(',')
           .map(s => {
             // The attribute value arrives here with all whitespace, except