Commit bb2a9f9
<sc-editingscripts /> nullreference (#56)
<!-- Provide a general summary of your changes in the Title above -->
<!-- Apply the label "bug" or "enhancement" as applicable. -->
## Description / Motivation
<!-- Describe your changes in detail -->
+ Removed throwing an error and rendering nothing instead for
<sc-editingscripts /> when no ISitecoreRenderingContext is available
<!-- Why is this change required? What problem does it solve? -->
In case of Experience Edge unavailability the ISitecoreRenderingContext
might be empty, there is no reason to throw an exception and crash the
page from rendering. This tag is often used in a main layout (like it
was on MVP Website) which is also used when rendering error pages
without a Sitecore context. Having this tag helper on the page causes
issues in such case while it's perfectly acceptable to have an empty
result.
<!-- If it fixes an open issue, please link to the issue here. -->
## Testing
- [X] The Unit & Intergration tests are passing.
- [X] I have added the necessary tests to cover my changes.
## Terms
<!-- Place an X in the [] to check. -->
<!-- The Code of Conduct helps create a safe space for everyone. We
require that everyone agrees to it. -->
- [X] I agree to follow this project's [Code of
Conduct](CODE_OF_CONDUCT.md).
---------
Co-authored-by: Ivan Lieckens <ivanlieckens@hotmail.com>1 parent 4270bbf commit bb2a9f9
2 files changed
Lines changed: 5 additions & 6 deletions
File tree
- src/Sitecore.AspNetCore.SDK.Pages/TagHelpers
- tests/Sitecore.AspNetCore.SDK.Pages.Tests/TagHelpers
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
| 28 | + | |
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
34 | | - | |
| 33 | + | |
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
0 commit comments