I am developing a chrome extension and it requires me to keep track of the last date that the extension was run. To do so, I am using chrome.storage.sync, however, the get call always returns the value that I have set as the default. Below is the code.

```js
 chrome.storage.sync.get({theDate: {}}, function (dateResult) {
    let currentDate = new Date();
    let setDate = dateResult.theDate; // always set to {}
    if (Object.keys(setDate).length === 0){ //if date has never been set before
        setDate = currentDate;
    }
    if (setDate.toLocaleDateString() !== currentDate.toLocaleDateString()){
          //do stuff if it is a different day than the last time extension was run
    }

    chrome.storage.sync.set({theDate: currentDate}, function () {
        console.log("Current date set.");

    });

});

```