Skip to content

Commit

Permalink
chore: replace deprecated String.prototype.substr()
Browse files Browse the repository at this point in the history
Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
  • Loading branch information
CommanderRoot committed Mar 17, 2022
1 parent 2e1dfff commit 11dc851
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ const queue = asyncQueue(({ id, data }, taskCallback) => {
let { options } = loader;

if (typeof options === 'string') {
if (options.substr(0, 1) === '{' && options.substr(-1) === '}') {
if (options.startsWith('{') && options.endsWith('}')) {
try {
options = parseJson(options);
} catch (e) {
Expand Down

0 comments on commit 11dc851

Please sign in to comment.