Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: GoToRow timestamp fails when selected row is out of view #1716

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/iris-grid/src/IrisGridUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ function isValidIndex(x: number, array: readonly unknown[]): boolean {
}

function isDateWrapper(value: unknown): value is DateWrapper {
return (value as DateWrapper).asDate != null;
return (value as DateWrapper)?.asDate != null;
}

class IrisGridUtils {
Expand Down
6 changes: 4 additions & 2 deletions packages/jsapi-utils/src/ConnectionUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@ export function fetchVariableDefinition(
*/
function handleFieldUpdates(changes: VariableChanges): void {
const definition = changes.created.find(def => def.title === name);
clearTimeout(timeoutId);
removeListener?.();
if (definition != null) {
clearTimeout(timeoutId);
removeListener?.();
resolve(definition);
} else {
reject(new TimeoutError(`Variable ${name} not found`));
}
}

Expand Down
Loading