From fb937bb59a9476338f1e3319565bb9701031bb67 Mon Sep 17 00:00:00 2001 From: Mor Kadosh Date: Fri, 31 May 2024 02:00:35 +0300 Subject: [PATCH] [example/until] replace call to jsonplaceholder with a static text (#1337) Co-authored-by: Mor Kadosh --- .../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')