From d11b4cc5afe5df811a240fb4725178fd3897662f Mon Sep 17 00:00:00 2001 From: Mor Kadosh Date: Tue, 21 May 2024 14:08:01 +0300 Subject: [PATCH] fix: replace call to broken jsonplaceholder with a static text --- .../samples/examples/directive-until/my-element.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/lit-dev-content/samples/examples/directive-until/my-element.ts b/packages/lit-dev-content/samples/examples/directive-until/my-element.ts index 3c50d7b8f..c50451122 100644 --- a/packages/lit-dev-content/samples/examples/directive-until/my-element.ts +++ b/packages/lit-dev-content/samples/examples/directive-until/my-element.ts @@ -3,11 +3,8 @@ import {customElement, state} from 'lit/decorators.js'; import {until} from 'lit/directives/until.js'; const fetchData = async () => { - const response = await fetch('https://jsonplaceholder.typicode.com/todos/2'); - const json = await response.json(); - // Add some delay for demo purposes - await new Promise((r) => setTimeout(() => r(), 1000)); - return json.title; + await new Promise((r) => setTimeout(() => r(), 2000)); + return 'Lorem Ipsum'; } @customElement('my-element')