How scary will a COVID-19 Halloween be for candy companies?

Our mission to help you navigate the new normal is fueled by subscribers. To enjoy unlimited access to our journalism, subscribe today.

Other than mask-wearing tweens and Disney-loving toddlers, no one obsesses more about Halloween than candy and chocolate makers.

Mars, the company behind Halloween staples like M&M’s and Snickers, starts its planning for the big day two years in advance. For Hershey—which has three of the top five Halloween brands in its namesake chocolate, Reese’s, and Kit Kat—the holiday represents 10% of the company’s annual sales. “It’s big,” says Phil Stanley, Hershey’s global chief sales officer.

But the uniquely American holiday is just the latest tradition that COVID-19 has the potential to thwart. “There’s a lot of uncertainty,” says Jefferies analyst Rob Dickerson. “The main question—is Halloween going to be a disaster or not?”

The obvious issue at play: trick-or-treating. “It’s designed to have you go out and interact with strangers en masse, which is the exact opposite of what everyone is being told to do right now,” says Jessica Adelman, vice president of corporate affairs at Mars Wrigley.

A recent survey conducted by the Harris Poll on behalf of the National Confectioners Association is giving candy companies a sign of hope: The results found that 74% of “millennial moms” and young parents say Halloween is more important than ever this year.

“We think that consumers will find creative and safe ways to trick-or-treat. It is an outdoor event, and it’s an event where a lot of masks are already worn,” said Hershey CEO Michele Buck on the company’s earnings call last month. She added that if trick-or-treating is lower than expected, Hershey will focus on the “Treat for Me and Candy Bowl occasion”—industry-speak for people buying candy that they will end up eating themselves.

Self-consumption has always been a massive part of the holiday and may end up salvaging sales for candy makers this year. Halloween isn’t a single day for the industry but rather a 10-week treat-buying fest. The holiday is basically an “excuse to buy candy,” says Dickerson.

Hershey, for example, has reported that people buying goodies to eat themselves makes up nearly 50% of sales at Halloween. Those purchases begin well before the holiday, with the other half of the season’s sales occurring in the last two weeks of October and designated for trick-or-treating.

Hershey starts receiving Halloween orders in May from retailers and says that it is so far pleased with how those sales are tracking. Stanley says he’s also optimistic based on how Easter panned out. The holiday took place at the height of the pandemic, but consumers just celebrated differently, with more events taking place at home. He expects the same for Halloween, which could drive up even more at-home consumption. “It’s a resilient category,” he says.

The pandemic in many ways has already showcased the strength of the sector, with consumers stockpiling candy and chocolate along with their canned soup and peanut butter. Hershey on its last earnings call reported that “everyday chocolate sales have consistently grown 9% since the pandemic began.”

Phil DeConto, vice president of category management and shopper insights at Ferrero, which is behind brands in the U.S. like Butterfinger, Crunch, and Baby Ruth, says that the very early seasonal sales data is on par with prior years. “I take peace in that it’s getting on the floor and that shoppers are finding and purchasing it in line with any other year,” he says.

But companies are still adjusting their plans to mitigate any potential risk. Hershey is scaling back its production of seasonal treats—think items like Reese’s Pumpkins—in favor of traditional products and packaging, which are easier to sell off if inventory is left over. Mondelēz International expects that consumers will be seeking out family-size packs rather than individual pieces for trick-or-treating.

Mars Wrigley is even going so far as to launch an app called Treat Town, which allows users to “virtually trick-or-treat for real candy.” Consumers can buy and earn credits that they will be able to redeem at retailers for the company’s products. It’s also partnering with the National Safety Council to develop guidelines for safe ways to celebrate Halloween amid the pandemic.

It’s not just the trick-or-treating that could move online. Ferrero’s DeConto points to stats from consultancy Kantar that indicate that online sales experienced the equivalent of five years’ worth of adoption in the first five weeks of the shutdown. It’s gone from a “strategic lever for the future to a strategic lever for right now,” he says.

That’s likely to continue during Halloween, with Hershey expecting that curbside pickup and home delivery will make up 15% to 20% of the season’s sales.

“My sense is that the human psyche works in complicated ways,” says Dickerson. “But I don’t think anybody can say there will be no Halloween.”

More must-read retail coverage from Fortune: