code: function invokePartialWrapper(partial, context, options) {
    var env = Handlebars;
    if (options.hash) {
      context = Object.assign({}, context, options.hash);
      if (options.ids) {
        options.ids[0] = true;
      }
    }
  
    partial = env.VM.resolvePartial.call(env.VM, partial, context, options);
    var result = env.VM.invokePartial.call(env.VM, partial, context, options);
  
    if (result == null && env.compile) {
      options.partials[options.name] = env.compile(partial, options);
      result = options.partials[options.name](context, options);
    }
  
    if (result != null) {
      if (options.indent) {
        let lines = result.split('\n');
        for (let i = 0, l = lines.length; i < l; i++) {
          if (!lines[i] && i + 1 === l) {
            break;
          }
  
          lines[i] = options.indent + lines[i];
        }
        result = lines.join('\n');
      }
      return result;
    }
  
    throw new Exception('The partial ' + options.name + ' could not be compiled when running in runtime-only mode');
  }
docs: Method mostly from Handlebars/runtime#invokePartialWrapper