Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Commit

Permalink
Add a local var
Browse files Browse the repository at this point in the history
  • Loading branch information
tugorez committed Feb 23, 2021
1 parent 2d8a455 commit a747717
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,15 @@ class XTypeGroup {

void _verifyExtensions() {
if (extensions == null) return;
for (var i = 0; i < extensions!.length; i++) {
if (!extensions![i].startsWith('.')) continue;
final exts = extensions!;
for (var i = 0; i < exts.length; i++) {
if (!exts[i].startsWith('.')) continue;
if (kDebugMode) {
print('extensions[${i}] with value "${extensions![i]}" is invalid.'
' We are mutating the extensions list to remove the leading dot.'
print('extensions[${i}] with value "${exts[i]}" is invalid.'
' The leading dots are being removed from the extensions'
' Please fix it.');
}
extensions![i] = extensions![i].substring(1);
exts[i] = exts[i].substring(1);
}
}

Expand Down

0 comments on commit a747717

Please sign in to comment.