Error during textUpdated
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 55/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- typescript
- Ambito
- frontend
Direzione di ricerca
Inizia in packages/sandbox/src/index.ts, su textUpdated intorno alla riga 227 e sul setTimeout in createTypeScriptSandbox intorno alla riga 246. Riproduci la disposizione prima che il timeout termini, quindi verifica che la sandbox non generi più un'eccezione quando editor.getModel() è null.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
short question before oepning a PR:
the following bug is part of the sanbox code , but not necessarily from the playground website ,im also using it in my own site
ive checked the code, and it looks similar enough so i assume it could be considered a bug
(update: ive played around a bit on the website and it seems that due to the amount of entire page reloads ur doing this is not an issue here 🤔)
Page URL: local page
Issue:
in https://github.com/microsoft/TypeScript-Website/blob/v2/packages/sandbox/src/index.ts#L227
const code = editor.getModel()!.getValue()
im getting
TypeError: can't access property "getValue", editor.getModel() is null
textUpdated index.ts:227
createTypeScriptSandbox index.ts:246
coming from the setTimeout in
https://github.com/microsoft/TypeScript-Website/blob/v2/packages/sandbox/src/index.ts#L246
i think this is mainly caused when the editor is disposed before the setTimeout finishes
my PR would just be to return the function if the model isnt there currently , this way there at least isnt an error
- Lingua principale
- TypeScript
- Stelle
- 2.6k
- Fork
- 1.5k
- Merge medio
- 1g 12h
- PR unite (30g)
- 5
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoft/TypeScript-Website
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
microsoft/TypeScript-Website#3611 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
microsoft/TypeScript-Website#3607 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 65/100
microsoft/TypeScript-Website#3039 ·
-
More examples of `infer` Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
microsoft/TypeScript-Website#2998 ·
-
@typescript/vfs emits an ExperimentalWarning on Node 26 during localStorage feature detection Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 30/100
microsoft/TypeScript-Website#3650 ·
Tutte le issue di microsoft/TypeScript-Website
Issue simili
-
S: triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
fix(errors): EHOSTUNREACH from a happy-eyeballs connect is reported as a resolver error (STAMP-80) Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
snapshot-labs/stamp#666 ·
-
fix(api): prevent leaderboard SSE heartbeat from starting after disconnect during initial load Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
GauravKarakoti/SecureFlow#1070 · 1 commento ·
-
feature:Languages/Translations good first issue ready Web
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
digitalfabrik/integreat-app#4394 ·