Skip to content

Commit

Permalink
Merge pull request #531 from IBM/fix/add-to-libl
Browse files Browse the repository at this point in the history
Check `preUsrlibl` and `postUsrlibl` before adding to library list
  • Loading branch information
SanjulaGanepola authored Jul 5, 2024
2 parents 234e646 + 4e9b45a commit b3d5bb7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/iproject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1029,8 +1029,12 @@ export class IProject {

if (unresolvedState && state) {
if (unresolvedState[position] && state[position]) {
if (state[position]!.includes(library)) {
window.showErrorMessage(l10n.t('{0} already exists in {1}', library, position));
if (state['preUsrlibl']!.includes(library)) {
window.showErrorMessage(l10n.t('{0} already exists in {1}', library, 'preUsrlibl'));
return;

} else if (state['postUsrlibl']!.includes(library)) {
window.showErrorMessage(l10n.t('{0} already exists in {1}', library, 'postUsrlibl'));
return;

} else {
Expand Down

0 comments on commit b3d5bb7

Please sign in to comment.