This repository was archived by the owner on Oct 6, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -15,14 +15,14 @@ const jsonLoader = {
1515 loader . addDependency ( filePath ) ;
1616 var content = fs . readFileSync ( filePath ) ;
1717
18- if ( typeof options . namespace !== 'undefined' ) {
18+ if ( options && typeof options . namespace !== 'undefined' ) {
1919 bundle [ lang ] = { } ;
2020 bundle [ lang ] [ options . namespace ] = JSON . parse ( content ) ;
2121 } else {
2222 bundle [ lang ] = JSON . parse ( content ) ;
2323 }
2424
25- if ( typeof options . parameters !== "undefined" ) {
25+ if ( options && typeof options . parameters !== "undefined" ) {
2626 bundle [ lang ] = this . replaceParameter ( bundle [ lang ] , options . parameters ) ;
2727 }
2828 } ) ;
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ const phpLoader = {
6060 console . warn ( 'The file "' + file . path + '" could not be parsed' , e . message ) ;
6161 }
6262
63- if ( typeof options . namespace !== 'undefined' ) {
63+ if ( options && typeof options . namespace !== 'undefined' ) {
6464 if ( typeof bundle [ directory ] === 'undefined' ) {
6565 bundle [ directory ] = { } ;
6666 bundle [ directory ] [ options . namespace ] = langObject
@@ -78,7 +78,7 @@ const phpLoader = {
7878 bundle [ directory ] = _ . extend ( bundle [ directory ] , langObject ) ;
7979 }
8080
81- if ( typeof options . parameters !== "undefined" ) {
81+ if ( options && typeof options . parameters !== "undefined" ) {
8282 bundle [ directory ] = this . replaceParameter ( bundle [ directory ] , options . parameters ) ;
8383 }
8484 }
You can’t perform that action at this time.
0 commit comments