Pārlūkot izejas kodu

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

webfansplz 3 gadi atpakaļ
vecāks
revīzija
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