Fix `topSpacerClass is undefined` error in `_undoAddSpacers`

Fixed a `topSpacerClass is undefined` error, that was being thrown when using the destroy method.
Merge remote-tracking branch 'github-sathvikp/patch-1'