Skip to content

Commit

Permalink
Fixes issues with user list empty (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
BetimBeja committed Oct 25, 2021
1 parent d54ea62 commit 3a5cc17
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app/scripts/background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ chrome.runtime.onMessage.addListener(function (message: IExtensionMessage, sende
let c = message.category.toString();
switch (c) {
case 'allUsers':
chrome.tabs.query({ active: true }, function (tabs) {
chrome.tabs.query({ active: true, currentWindow: true }, function (tabs) {
chrome.tabs.sendMessage(tabs[0].id, {
category: 'allUsers',
type: 'Background',
Expand Down Expand Up @@ -104,6 +104,7 @@ chrome.runtime.onMessage.addListener(function (message: IExtensionMessage, sende
chrome.tabs.query(
{
active: true,
currentWindow: true
},
function (tabs) {
chrome.tabs.executeScript(tabs[0].id, {
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/inject/levelup.servicecalls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export class Service {

allUsers() {
const userId =
this.utility.Xrm?.Utility?.getGlobalContext()?.getUserId() ?? this.utility.Xrm.Page.context.getUserId();
this.utility.Xrm?.Utility?.getGlobalContext?.().getUserId() ?? this.utility.Xrm.Page.context.getUserId();
this.utility
.fetch(
'systemusers',
Expand Down

0 comments on commit 3a5cc17

Please sign in to comment.