File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -506,8 +506,8 @@ exports.clearCache = function () {
506506 exports . cache . reset ( ) ;
507507} ;
508508
509- function Template ( text , opts ) {
510- opts = opts || utils . createNullProtoObjWherePossible ( ) ;
509+ function Template ( text , optsParam ) {
510+ var opts = utils . hasOwnOnlyObject ( optsParam ) ;
511511 var options = utils . createNullProtoObjWherePossible ( ) ;
512512 this . templateText = text ;
513513 /** @type {string | null } */
@@ -949,3 +949,4 @@ exports.name = _NAME;
949949if ( typeof window != 'undefined' ) {
950950 window . ejs = exports ;
951951}
952+
Original file line number Diff line number Diff line change @@ -238,4 +238,13 @@ exports.createNullProtoObjWherePossible = (function () {
238238 } ;
239239} ) ( ) ;
240240
241+ exports . hasOwnOnlyObject = function ( obj ) {
242+ var o = exports . createNullProtoObjWherePossible ( ) ;
243+ for ( var p in obj ) {
244+ if ( hasOwn ( obj , p ) ) {
245+ o [ p ] = obj [ p ] ;
246+ }
247+ }
248+ return o ;
249+ } ;
241250
You can’t perform that action at this time.
0 commit comments