Skip to content

Commit cb99803

Browse files
lpoulterArthur Evans
and
Arthur Evans
authored
Update expressions.md (#442)
* Update expressions.md State that ifDefined is a function and link to it. * Absolute path for the link. Co-authored-by: Arthur Evans <arthure@google.com>
1 parent 4d623e0 commit cb99803

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/lit-dev-content/site/docs/templates/expressions.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ html`<img src="/images/${this.imagePath}/${this.imageFile}">`;
215215

216216
If `this.imagePath` or `this.imageFile` is not defined, the `src` attribute should not be set or an invalid network request will occur.
217217

218-
You can use the `ifDefined` function to avoid this issue:
218+
You can use the [ifDefined](/docs/api/directives/#ifDefined) directive to avoid this issue:
219219

220220
```js
221221
html`<img src="/images/${ifDefined(this.imagePath)}/${ifDefined(this.imageFile)}">`;

0 commit comments

Comments
 (0)