Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sime3134 committed Jul 13, 2024
1 parent eb8fea3 commit 789924c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,20 @@
<script type="module">
import GCalendarFetcher from "./dist/g-calendar-fetcher.min.js";

const parser = new GCalendarFetcher({
url: "test_url",
amountOfPastEvents: 2,
});

try {
const events = await parser.fetchEvents();
console.log(events);
} catch (e) {
console.log(e);
}

console.log(GCalendarFetcher); // Should log the GCalendarFetcher class
</script>
<script src="luxon.min.js"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion src/g-calendar-fetcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default class GCalendarFetcher {
constructor(options) {
this.url = options.url;
this.amountOfPastEvents = options.amountOfPastEvents;
this.dateTime = DateTime;
this.dateTime = luxon.DateTime;
}

async fetchEvents() {
Expand Down

0 comments on commit 789924c

Please sign in to comment.