Skip to content

Commit 11dc851

Browse files
committed
chore: replace deprecated String.prototype.substr()
Signed-off-by: Tobias Speicher <[email protected]>
1 parent 2e1dfff commit 11dc851

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/worker.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ const queue = asyncQueue(({ id, data }, taskCallback) => {
178178
let { options } = loader;
179179

180180
if (typeof options === 'string') {
181-
if (options.substr(0, 1) === '{' && options.substr(-1) === '}') {
181+
if (options.startsWith('{') && options.endsWith('}')) {
182182
try {
183183
options = parseJson(options);
184184
} catch (e) {

0 commit comments

Comments
 (0)