Skip to content

Commit

Permalink
INTL-1332: minor change in condition
Browse files Browse the repository at this point in the history
  • Loading branch information
chetansinghchoudhary-wk committed Sep 13, 2023
1 parent f169e23 commit 5e38c29
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/src/intl_suggestors/intl_importer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Stream<Patch> intlImporter(
final importFormat = decideImportFormat(hasPackageImport, hasRelativeImports);

final importStatement = importFormat == 'package' ? insertInfo.leadingNewlines + "import '$intlUri'; " + insertInfo.trailingNewlines
: insertInfo.leadingNewlines + "import './intl/${projectName}_intl.dart'; " + insertInfo.trailingNewlines;
: insertInfo.leadingNewlines + "import '../intl/${projectName}_intl.dart'; " + insertInfo.trailingNewlines;
yield Patch(
importStatement,
insertInfo.offset,
Expand Down Expand Up @@ -142,7 +142,7 @@ _InsertionLocation _insertionLocationForPackageImport(
if(uriContent != null){
if(uriContent.startsWith('package:')){
hasPackageImports = true;
} else if(uriContent.startsWith('./intl/')){
} else if(uriContent.startsWith('../')){
hasRelativeImports = true;
}
}
Expand Down

0 comments on commit 5e38c29

Please sign in to comment.