Need Help with Integer-to-Variable

Yes, this works. I had something similar working earlier when I was testing, but I need one more step. Here’s what I had earlier while testing:

var galImage = 0;

$w.onReady(function () {
    $w("#slideshow1").changeSlide(galImage);
});

But I need to use a session variable instead. I “set” the session variable with a button-click on my page and then “get” the session variable in the lightbox where I placed my slideshow. I the following snippet, I change out “var galImage = 0;” for a “getItem” variable declaration:

import {session} from 'wix-storage';
var galImage = session.getItem("galImage");

$w.onReady(function () {
    $w("#slideshow1").changeSlide(galImage);
});

The session variable is an integer. All should be well, but I’m getting a correction mark under “galImage” in the parentheses in the “chanegeSlide” option.

I’ve also tried this (using “let” in the “onReady” function) instead of “var”:

import {session} from 'wix-storage';

$w.onReady(function () {
    let galImage = session.getItem("galImage");
    $w("#slideshow1").changeSlide(galImage);
});

But this doesn’t work either.

Thoughts?