This patch fixes an issue where the Angular shelving location selection
component (eg-item-location-select) wouldn't work (in particular,
when its contextOrgIds wasn't set, as opposed to contextOrgId).
Coding note: TypeScript confounds the Perl programmer: an empty array
evaulates to true; .length needs to be checked instead.
To test
-------
[1] Apply the patch.
[2] Verify that the shelving location selector works in the following
interfaces:
- Acquisitions Administration -> Distribution Formuals
- Course Materials (in the material form for a course)
- Linked locations for Circulation Limit Sets
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Signed-off-by: Jane Sandberg <sandbergja@gmail.com>
Signed-off-by: Michele Morgan <mmorgan@noblenet.org>
setFilterOrgs(): Promise<number[]> {
let contextOrgIds: number[] = [];
- if (this.contextOrgIds) {
+ if (this.contextOrgIds.length) {
contextOrgIds = this.contextOrgIds;
} else {
contextOrgIds = [this.contextOrgId || this.auth.user().ws_ou()];