File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed
fixtures/development-svelte-builds Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ if (DEPRECATED_PARTIALS) {
12
12
}
13
13
14
14
if ( DEPRECATED_PARTIALS && someOtherThing ( ) ) {
15
+ throw new Error ( 'You indicated you don\'t have any deprecations, however you are relying on DEPRECATED_PARTIALS.' ) ;
16
+
15
17
doStuff ( ) ;
16
18
}
17
19
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ if (DEPRECATED_PARTIALS) {
12
12
}
13
13
14
14
if ( DEPRECATED_PARTIALS && someOtherThing ( ) ) {
15
+ throw new Error ( "You indicated you don't have any deprecations, however you are relying on DEPRECATED_PARTIALS." ) ;
15
16
doStuff ( ) ;
16
17
}
17
18
Original file line number Diff line number Diff line change @@ -101,8 +101,9 @@ module.exports = class Macros {
101
101
// in debug builds add an error after a conditional (to ensure if the
102
102
// specific branch is taken, an error is thrown)
103
103
if ( envFlags . DEBUG && svelteMap [ source ] [ flag ] === false ) {
104
- if ( p . parentPath . isIfStatement ( ) ) {
105
- let consequent = p . parentPath . get ( 'consequent' ) ;
104
+ let parentIfStatement = p . find ( p => p . isIfStatement ( ) ) ;
105
+ if ( parentIfStatement ) {
106
+ let consequent = parentIfStatement . get ( 'consequent' ) ;
106
107
consequent . unshiftContainer (
107
108
'body' ,
108
109
t . throwStatement (
You can’t perform that action at this time.
0 commit comments